When I was first trying to install phpBB on to my systems I hated doing it remotely through FTP. Through FTP programs it was slow uploading the phpBB folder to the server. So I came up with a way that you only have to upload the compressed file to the server and run a script to extract and go through the installation right away.
What you should do first is create a directory where you want the location of the phpBB forums to be. The most common name is forums/. Then upload the compressed phpBB file to that new directory. So now the structure should look as follows:
forums/
phpBB-3.0.4.zip (depending on what version you have...in my case its 3.0.4)
Then upload the extraction php file to the same directory then run the php file. BUT first lets take a look at what the extract.php file looks like.
extract.php
<?php
//a redirect function...an alternative to just using header('Location: blah.php')
function redirect($location, $delay = 0) {
print '<script type="text/javascript">
setTimeout(function () {window.location = "'.$location.'"}, '.$delay.');
</script>';
}
//put whatever the phpbb file name is in this command...mine is phpBB-3.0.4.zip
$command = 'unzip phpBB-3.0.4.zip';
if (exec($command, $output)) {
foreach ($output as $op) {
}
print '<strong>Extraction Success!</strong>';
} else {
print '<strong>Extraction Failed!</strong>';
}
//start the second command...the extracted folder would be call phpBB3 since the current version is 3.x.x
$command_2 = 'cp -v -r phpBB3/* .; rm -v -r phpBB3';
if (exec($command_2, $output)) {
foreach ($output as $op) {
}
print 'Reformating Success!';
} else {
print 'Reformating Failed!';
}
//now go to the index page where it will redirect you to the installation set up
redirect('index.php');
?>
Make sure in this block you have the right file name for the compressed phpBB file in the $command variable:
<?php
//put whatever the phpbb file name is in this command...mine is phpBB-3.0.4.zip
$command = 'unzip phpBB-3.0.4.zip';
?>
Just like above, make sure you have the right folder name for this block:
//start the second command...the extracted folder would be call phpBB3 since the current version is 3.x.x
$command_2 = 'cp -v -r phpBB3/* .; rm -v -r phpBB3';
That is basically it.
Have fun,
Rashaud