1. Installing Apache
: Http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32
If you need to change the port: Open the Apache installation directory under the Conf directory httpd.conf file, find listen 80,80 is now used port, change 80 for other ports;
2. Install PHP
: http://windows.php.net/download (Download version of Php5apache2_2.dll file)
such as downloading the Php-5.2.17-win32-vc6-x86.zip file (VC9 is specifically for IIS , VC6 is provided for other web services software, such as Apache), after decompression placed on the C-drive (or other location), the path is C:\php;
3. PHP Environment Configuration
Rename the php.ini-dist or php.ini-development configuration file to PHP.ini (the semicolon in the file starts the behavior comment content), and then do the following settings:
1) Extension_dir = "C:/php5/ext"
2) Uncomment the following settings:
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_pdo_mysql.dll
Extension=php_pdo_odbc.dll
Extension=php_xmlrpc.dll
3) Configure the session function:
When using the session function, you must configure the session file on the server to save the directory, or you can not use session, a new read-write directory folder on Windows 7, this directory is best independent of the Web main program directory, The PHPSESSIONTMP directory is established on the D packing directory and is then found in the php.ini configuration file, Session.save_path = "/tmp" to Session.save_path = "d:/ Phpsessiontmp "
4) Configure the PHP file upload function
As with the session, when using PHP file Upload function, we must specify a temporary folder to complete the file upload function, or the file upload function will fail, we still need to create a read-write directory folder on Windows 7, Here I set up the Phpfileuploadtmp directory on the D packing directory, and then found in the php.ini configuration file, Upload_tmp_dir = changed to upload_tmp_dir = "d:/phpfileuploadtmp "
5) Modify Date.timezone
;d Ate.timezone = changed to date.timezone = Asia/shanghai
4. Configure Apache to support PHP
1) Add under #loadmodule vhost_alias_module modules/mod_vhost_alias.so
LoadModule php5_module "C:/php/php5apache2_2.dll"
Phpinidir "c:/php"
AddType application/x-httpd-php. php. html. htm
Note: in the PHP directory you can see multiple php5apache dll files, due to the use of Apache2.2, So you need to use Php5apache2_2.dll, and then specify the PHP installation directory and the program extension to execute.
2) The default Apache server executes the Web main program directory as Apache2.2/htdocs, so when your Web main program directory changes, we need to modify the corresponding Apache configuration, will be
DocumentRoot "C:/Program Files/apache software Foundation/apache2.2/htdocs"
Switch
DocumentRoot "D:/phpweb"//d:/phpweb for own Site Directory
Will
<directory "C:/Program Files/apache software Foundation/apache2.2/htdocs" >
Switch
<directory "D:/phpweb" >
3) Finally modify the specific index file order, due to the configuration of PHP functions, of course, need to index.php priority implementation;
DirectoryIndex index.html
Switch
DirectoryIndex index.php index.html
4) Restart Apache server
On the Apache server, the PHP environment configuration work is completed, only need to create a new PHP file in the D:/phpweb directory, write
<?
Phpinfo ();
?>
Then enter http://localhost:88/index.php in the browser to see the specific configuration page for PHP.
5. install MySQL
: Http://www.mysql.com/downloads
6. The IDE can be used with Zend Studio
Http://www.geekso.com/ZendStudio9-key
REF:
Http://www.cnblogs.com/Peter-Zhang/archive/2012/12/10/2810915.html
Http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html
http://windows.php.net/download/
Windows 7 installs the PHP Runtime Environment and development environment