Similarities and differences between PHP4 and PHP5 configuration _php

Source: Internet
Author: User
Keywords compare configure directory for load LOADMODULE AP
Tags sapi
During the configuration of PhP4 or PHP5, the steps for php4,5 configuration are roughly the same, but there are some differences in configuration content. In Linux and other environments to compile, in general, as long as the compilation of the correct options, the configuration is correct, in Windows configuration you need to pay attention to the following different points:
1. Php4ts.dll and Php5ts.dll
This file will be copied to the Apache Bin directory or under the system directory.
2. httpd.conf File Loading module
Examples are 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. Different ways to load MySQL

In PhP4 and previous versions, MySQL was integrated in PHP;
In the PHP5 (including beta) version, MySQL is loaded as a module and needs to be set php.ini to load, for example
Extension_dir = "d:/www/webserver/php5/ext/"
Extension=php_mysql.dll

In addition, PHP4,PHP5 need the system directory of Libmysql.dll support, if the wrong version, even if you set the correct extension_dir and Php_mysql.dll parameters, will also cause Apache boot time prompt phpp_ Mysql.dll the error that could not be found.

You are welcome to discuss and correct me.
  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.