So, here it is...
- Download and install XAMPP.
You can install it pretty much where you want, since it's a portable application. It is usually handier not to install it in the wondows system hard drive / partition to be able to keep it upon windows re-install.
NOTE :- Inside the folder you installed XAMPP to (default is 'c:\xampp\') there is a folder called 'htdocs'. This folder should be thought of as your new root folder and will be accessible via 'http://localhost/'.
- Whenever accessing file from your harddrive through the web browser, in other words, when your trying to utilize your local server, do NOT use 'file:///C:/xampp/htdocs/', you MUST use localhost like 'http://localhost/' so unfortunately this means right clicking on a file and selecting 'Open With' and choosing IE or FireFox will not work as they will try and load it with 'file:///C:/xampp/htdocs/' and not 'http://localhost/'.
- Last Tweak :
Deleting htdocs/index.php may be handy. It's only used to redirect http://localhost/ to xampp's admin tools (such as phpMyAdmin) located in http://localhost/xampp/.
If you do so, loading http://localhost/ will show you the list of directories available which is handy to browse them instead of having to type their exact location. And you can stil access xampp's admin tools by clicking on the xampp/ directory listed.
- Inside the folder you installed XAMPP to (default is 'c:\xampp\') there is a folder called 'htdocs'. This folder should be thought of as your new root folder and will be accessible via 'http://localhost/'.
- Download and install MySQLDumper.
Installing MySQLDumper by simply copying it to the root folder of any/every site you wish to use it on and edit the config.php if needed (set for localhost by default). You can run MySQLDumper by loading "http://localhost/mysqldumper/" or "http://www.example.com/mysqldumper/" in your browser (or whatever location you put it in). The first time you run MySQLDumper on a site, it will ask which language you wish to install it in and will then install itself. After you have succesfully installed MySQLDumper you can create a new DB named identical to the one on the live site and then restore your backup into that database. The ideal backup method is to use MySQLDumper on the live site to make the backup but the program does have the capabilities to use backups from other software such as phpmyadmin.
NOTE :- You need to protect the directory that you put MySQLDumper into any time that you put it online. After all, allowing normal users access to your database user name and password is a very very bad idea. To protect the folder, you can create your own .htaccess that will only allow access from your IP, or you can use the directory protection feature that is built into MySQLDumper which will allow you to password protect the directory.
- Example .htaccess :
- Code: Select all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
- You need to protect the directory that you put MySQLDumper into any time that you put it online. After all, allowing normal users access to your database user name and password is a very very bad idea. To protect the folder, you can create your own .htaccess that will only allow access from your IP, or you can use the directory protection feature that is built into MySQLDumper which will allow you to password protect the directory.
- Install your online forum on the local server :
- Backup all your forum / site files and copy them in a sub-directory of htdocs/, we will use phpBB3/ in this example.
- If you did not already restore your backup from the live site as discussed above, this is the time to do it. Remember the steps are, create a database with the exact same name as one on the live site, backup a copy of the live site's DB using MySQLDumper or your preferred software, place the backup into the localhost's /mysqldumper/work/backup/ folder and then use your local copy of MySQLDumper to restore the DB.
- Delete all the files in the phpbb's cache folder except for '.htaccess' .
- Edit the phpbb config.php file and change dbuser (the database user name) to 'root', the dbpass (the database password) to '' (leave it blank), and the port to '3306' (the XAMPP default).
- Edit the config table in the localhost copy of your db to make the cookie domain and the server url both point to 'localhost'. Also, if your putting the backup into a subfolder inside of htdocs, you will need to change the script path too. You can use MySQLDumper or PHPMyAdmin to edit them manually or run the following statements with the phpbb_ prefix altered if needed. Make sure you have selected your database before running the query(s).
- Code: Select all
UPDATE `phpbb_config` SET `config_value` = 'localhost' WHERE `config_name` = 'server_name';
UPDATE `phpbb_config` SET `config_value` = 'localhost' WHERE `config_name` = 'cookie_domain';
And if needed: (The last line only needs to be run if your not putting the site directly into the root of yout localhost setup (into the htdocs folder and not a subfolder in it such as phbb3))- Code: Select all
UPDATE `phpbb_config` SET `config_value` = '/phpBB3' WHERE `config_name` = 'script_path';
You should now be able to access the site locally. Try browsing to it by opening your browser and
navigating to 'http://localhost/phpBB3/' (using the example above). - Backup all your forum / site files and copy them in a sub-directory of htdocs/, we will use phpBB3/ in this example.
Now lets talk about some advanced configuration options. The settings we go over below are only the ones that may possibly be needed when working on large phpBB sites and large phpBB2 to phpBB3 conversions. Any setting changes suggested below require a xampp restart.
- php.ini settings: In xampp, you will find 'php.ini' in '/xampp/php/'.
- max_execution_time :
Maximum execution time of each script, in seconds. The default value is 60 but you may need to use a higher value like this :- Code: Select all
max_execution_time = 300
- max_input_time :
max_input_time : Maximum amount of time (in seconds) that each script may spend parsing the request data. The default value is 60 but you may need to use a higher value like this :- Code: Select all
max_input_time = 300
- memory_limit :
Maximum amount of memory that a script may consume. The default value is 32M but you may need to use a higher value like this :- Code: Select all
memory_limit = 128M
- mysql.connect_timeout :
Maximum time (in seconds) for the connection to timeout. Just remember that it is useless to set it to a higher value than the PHP 'max_execution_time' value that we discussed a moment ago. An entry of '-1' means no limit. The default value is 60 but you may need to use a higher value like this :- Code: Select all
mysql.connect_timeout = 300
- Other values that you could need to tweak are the one used to upload file, even though it's less likely to be mandatory, especially on a local server. Values to increase to be able to post bigger files are :
- upload_max_filesize :
The maximum size of any file that can be uploaded. In some rare cases you may need it to be even higher than the example. The default is 64m but you may need to increase it like in the following example :- Code: Select all
upload_max_filesize = 256M
- post_max_size :
The maximum size of any file that can be uploaded including any forms, fields, or mime headers length in bytes that may be sent with it. In some rare cases you may need it to be even higher than the example. The default is 64m but you may need to increase it like in the following example :- Code: Select all
post_max_size = 256M
- max_execution_time :
- my.ini settings: In xampp you will find my.ini' located in '/xampp/mysql/bin/'.
- max_allowed_packet :
The maximum size of one packet or any generated/intermediate string. The default is 1m but you may need to increase it like in the following example.- Code: Select all
max_allowed_packet = 2M
- Remember to restart xampp after making any of the recommended changes.
- max_allowed_packet :
Good luck!
I would like to say "Thanks" to dcz for helping me put together this guide.
Typo

English |
French



