Heim  >  Artikel  >  php教程  >  php4和php5的配置异同比较

php4和php5的配置异同比较

WBOY
WBOYOriginal
2016-06-13 10:27:151178Durchsuche

配置php4或者php5的过程中,php4,5的配置的步骤大致一样的,但是配置内容有一些差别。在LINUX等环境下编译,一般来说,只要编译的选项正确,配置也就正确了;在windows配置则需要注意以下不同点: 1. php4ts.dll 和 php5ts.dll 这个文件要拷贝到apache的bin目录下或者系统目录下 2. httpd.conf 文件加载的模块 示例如下: # 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 # 其中d:/www/webserver/php4是php的所在目录。 # 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 # 其中d:/www/webserver/php5是php的所在目录。 3. 加载mysql的方式不同 在php4以及以前的版本中,mysql是集成在php中的; 而在PHP5(包括BETA)版本,mysql是作为一个模块加载的,需要设置php.ini来加载,例如 extension_dir = "D:/www/WebServer/PHP5/ext/" extension=php_mysql.dll 另外,PHP4,PHP5都需要系统目录下的libmysql.dll的支持,如果版本不对,即使你设置了正确的extension_dir和php_mysql.dll的参数,也会造成apache启动的时候提示phpp_mysql.dll找不到的错误。 欢迎大家讨论和指正。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn