Home >Backend Development >PHP Tutorial >Comparison of Php4 and php5 configurations under different systems_PHP tutorial

Comparison of Php4 and php5 configurations under different systems_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 14:55:49768browse

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. When compiling in environments such as LINUX, generally speaking, as long as the compilation options are correct, the configuration will be correct; when configuring in windows, you need to pay attention to the following differences:

1. php4ts.dll and php5ts.dll
This file should be copied to the bin directory of apache or the system directory

2. The module loaded by the httpd.conf file
The example is as follows:
# 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 way to load mysql is different

In php4 and previous versions, mysql is integrated in php;
In PHP5 (including BETA) version, mysql is as To load a module, you need to set php.ini to load, for example
extension_dir = "D:/www/WebServer/PHP5/ext/"
extension=php_mysql.dll

In addition, PHP4, PHP5 requires the support of libmysql.dll in the system directory. If the version is incorrect, even if you set the correct extension_dir and php_mysql.dll parameters, it will cause an error that phpp_mysql.dll cannot be found when apache starts.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364360.htmlTechArticleIn the process of configuring php4 or php5, the steps for php4 and 5 are roughly the same, but there are some configuration contents difference. Compiling in environments such as LINUX, generally speaking, as long as the compilation options are correct...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn