In the process of configuring php4 or php5, the configuration steps of php4 and 5 are roughly the same, but there are some differences in the configuration content. Compiling in LINUX and other environments. In general, the configuration is accurate as long as the compilation options are accurate. you need to pay attention to the configuration in windows.
In the process of configuring php4 or php5, the configuration steps of php4 and 5 are roughly the same, but there are some differences in the configuration content. Compile in LINUX and other environments. In general, the configuration is accurate as long as the compilation options are accurate. in windows configuration, pay attention to the following differences:
1. php4ts. dll and php5ts. dll
This file must be copied to the bin directory of apache or the system directory.
2. httpd. conf file loaded module
Example:
# For PHP4 apache1.x. xx
LoadModule php4_module d:/www/webserver/php4/sapi/php4apache. dll
AddType application/x-httpd-php. php
# For PHP4 apache2.x. xx
LoadModule php4_module d:/www/webserver/php4/sapi/php4apache2. dll
AddType application/x-httpd-php. php
# Where d:/www/webserver/php4 is the directory where php is located.
# For PHP5 apache1.x. xx
LoadModule php5_module d:/www/webserver/php5/php5apache. dll
AddType application/x-httpd-php. php
# For PHP5 apache2.x. xx
LoadModule php5_module d:/www/webserver/php5/php5apache2. dll
AddType application/x-httpd-php. php
# Where d:/www/webserver/php5 is the directory where php is located.
3. the method for loading mysql is different.
In php4 and earlier versions, mysql is integrated into php;
In PHP5 (including BETA), mysql is loaded as a module, and php. ini needs to be set for loading. for example:
Extension_dir = 'd:/www/WebServer/PHP5/ext /'
Extension = php_mysql.dll
In addition, both PHP4 and PHP5 require libmysql in the system directory. dll support. if the version is incorrect, even if you set the extension_dir and php_mysql.dll parameters accurately, the error phpp_mysql.dll cannot be found during apache startup.