Install PHP
Download PHP5, extract it, and copy php.ini-dist to php.ini in the PHP5 root directory.
- Edit
php.ini. change the linedoc_root = "X:\yy\web\".X:\yy\web\is your webpages' root directory. - delete the "#" before the
extension=php_gd2.dll,
extension=php_gettext.dll,
extension=php_mysql.dll
Install Apache
Download Apache, install it. then you should edit the httpd.conf:
- add the line
LoadModule php5_module X:/PHP5/php5apache2.dll
under theLoadModule...line. - find the line
ServerName..., change the servername to your domain name. If you haven't a domain name, you can set it to your IP address, or you set it asServerName 127.0.0.1:80, the "80" is the port. Then your computer can provide a web service. - find the line
DocumentRoot..., set it to your webpages' root directory, likeDocumentRoot "X:/yy/web". - you should find the line
<Directory "default directory">, Change it as<Directory "X:/yy/web">,theX:/yy/webis your webpages' root directory. - find the line
DirectoryIndex index.html index.html.var,
addindex.phpto the end. - add the line
ScriptAlias /php5/ "X:/PHP5/". - add the line
AddType application/x-httpd-php5 .php. - add the line
Action application/x-httpd-php5 "/php5/php-cgi.exe". - add the line
PHPIniDir "X:/PHP5/".
Install MySQL
Download MySQL 5.0, install it. When installing finished, the configureation wizard start, you should note the following:
- If you want to connect your database remotely, you should choose "Enable TCP/IP Networking";
- If you want to contain universal characters to your database, you should choose "Best Support For Multilingualism";
- check "Install As Windows Service", and "Launch the MySQL Server automatically" if you want to do it.