The configuration differences between php4 and php5 are compared. in the process of configuring php4 or php5, the configuration steps of php4 and 5 are roughly the same, but the configuration content is different. Compiling in LINUX and other environments. In general, the steps for configuring php4 or php5 are roughly the same, but there are some differences in the configuration content. Compile in LINUX and other environments. In general, the configuration is correct as long as the compilation options are correct. 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. different ways to load mysql
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 have set the extension_dir and php_mysql.dll parameters correctly, the error phpp_mysql.dll cannot be found during apache startup.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.