PHP server configuration (using Apache and IIS ). 1. use the apacheappsphp5.2.5installer to download php-5.2.5-win32.zip to the official website and decompress it. (it is said that you do not need to download or use its Installer. this method is automatic.
I. use Apache
≡ PHP 5.2.5 installation plugin
1. download the php-5.2.5-Win32.zip and unzip it at its official site (said: Do not download and use its Installer, this method is very automated, intelligent, but there are also many restrictions, because it is not recommended .) To a directory "D: \ PHP ".
Set PHP under the PHP Directory (D: \ PHP \ php. ini-recommended: copy it to the windows directory (some systems are winnt directories) and change it to php. ini, and find extension_dir, and change it to extension_dir = "D: \ PHP \ ext ". In fact, using php. ini-dist can achieve the same effect, but we recommend using php. ini-recommended, because this file optimizes the default settings for performance and security.
PHP. ini description:
Default_charset = "gb2312", modify the default character set. here, if there is a semicolon ";" in front, remove this semicolon;
Change register_globals = Off to register_globals = On to make the passed global variable valid;
Extension = php_dba.dll if there is a semicolon in front, cancel the semicolon, the same as below;
Extension = php_dbase.dll
Extension = php_gd2.dll GD library is used for drawing verification codes;
Extension = php_mysql.dll is used to connect to the MYSQL database;
Short_open_tag = On support And , Off is only supported
Copy the php5ts. dll and libmysql. dll files in the D: \ PHP directory to the windows system folder: C: \ windows \ system32.
≡ Apache 2.2.8 installation tips
1. download the apache_2.2.8-win32-x86-no_ssl.msi from its official site and execute it.
Press the Next button three times and enter your Network Domain (Network Domain name), Server Domain (Server Domain name), and website administrator's E-mail as required by the installer, this section describes the local self-built test environment. you can enter localhost in the first two cases and write your own email.
After entering Next, the default installation path is "C: \ Program Files \ Apache Software Foundation \ Apache2.2 \". modify the path to "D: \ PHP \ Apache2.2 ".
Next, go all the way until the installation is complete. open the PHP folder under drive D and you will see a folder named Apache2.2.
2. open IE and enter "http: // localhost" or "http: // 127.0.0.1" in the address bar to view the successful installation of Apache;
3. conf/httpd. conf file configuration
1) search for "DocumentRoot". here is the Directory of the specified home page. The default value is "D: \ PHP \ Apache2.2 \ htdocs". you can use the default directory or define it yourself, for example, "D:/PHP ". Note: Do not add "/" at the end of the Directory.
2. check the directory directoryindex.html. this is the name of the first page of the document. you can add index. php to the end of index.html. Multiple file names are separated by spaces.
3) search
Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all
To:
Options FollowSymLinks
AllowOverride None
Order deny, allow
Allow from all
If You do not change this page, You may encounter an error such as You don't have permission to access/on this server. especially after You change the default homepage path.
4) create a virtual directory
Find ......
Add Alias/webpath "D: \ PHP \ Apache2.2 \ phptxt"
Options MultiViews
AllowOverride None
Order allow, deny
Allow from all
The/webpath is the virtual directory name, and "D: \ PHP \ Apache2.2 \ phptxt" is the file storage location.
The access address is http: // localhost/webpath/
5) enable the server to support PHP, and add the following two codes to the corresponding location:
LoadModule php5_module "D: \ PHP \ php5apache2_2.dll"
AddType application/x-httpd-php. php. php3. inc
Note: If the httpd. conf file is modified, restart Apache2.2 to make it take effect.
II. use IIS to parse php files
1. install PHP 5.2.5 first.
2. open the IIS Manager and select "default website"> "properties". in the displayed dialog box, select "main directory", and change the execution permission to "script and executable file ", click "configure" to add the application extension Ing. select "D: \ PHP \ php5isapi" as the executable file. dll ", extension". php, and select all actions, script engine, and check whether the file exists.
If it is a win2003 system, you also need to add web service extensions. the required file is "D: \ PHP \ php5isapi. dll", the extension is "PHP", and the status is changed to allow.
Installation Tips PHP 5.2.5 1. download the php-5.2.5-Win32.zip and unzip it at its official site (said: Do not download and use its Installer, although this method is very automatic...