Php-5.3 + APACHE installation configuration

Source: Internet
Author: User
The corresponding php5apache2dll varies with apache versions. if you load the incorrect php5apache2dll, the error message CannotloadD: PHPphp5apache2_2dllintoserver is displayed. Apache22 corresponds to php5apache2_2 because of the different apache versions, corresponding to "php5apache2. dll is also different, if you load the wrong "php5apache2. dll, the system will prompt the error message of Cannot load D:/PHP/php5apache2_2.dll into server. Apache2.2 corresponds to php5apache2_2.dll Apache2.1 corresponds to php5apache2. dll Apache1 corresponds to php5apache. dll. Therefore, if Apache2.2 is installed and PHP5.0 is installed, an error occurs. when installing Apache and PHP, select the corresponding version for configuration and installation. 1. install apache on http://httpd.apache.org/download.cgi#apache24 Select the latest apache (32bit thread security) on the official website. 2. after installation, enter the following in the browser: http://localhost If the page is displayed in it works, it indicates that the installation is successful. 3. install php 3.1 and go to the php official website. http://windows.php.net/download/ Here, we select the VC9 x86 Thread Safe (21:56:58) (32bit Thread security, which includes the 3.2 Runtime file corresponding to php5apache2_2.dll and Apache2.2). if msvcr *** is prompted ***. the dll file cannot be found and the corresponding vc needs to be downloaded. We installed the VC9 x86 Thread Safe version, so we should install the vc9 version. The new version of the VC11 x86 Thread Safe requires vc support. if it is not installed, the system will prompt that msvcr110.dll cannot be found, install vc to install vc11 components. please go http://www.microsoft.com/zh-CN/download/details.aspx?id=30679 Download. For details, refer to the official website (which also contains the selection tips for apache and php versions)
4. configuration of php and apache file 4.1 with the upgrade of php, the previous php. ini-dist and php. ini-recommended is missing and php appears. ini-developmen and php. ini-production. then Google learns that due to version updates, these files have a new name: php. ini-production corresponds to php. ini-recommendedphp.ini-development corresponds to php. ini-dist; for PHP versions earlier than 5.3. ini-dist or php. rename ini-recommended to php. ini. According to the instructions, the difference between the two is that php. ini-dist is suitable for development programs (for testing), while php. ini-recommended has high security settings, which is suitable for product launch. Here, we will. ini-production: paste it to the C: \ Windows directory and rename php. ini a. modify short_open_tag = ON B, modify asp_tags = On c, modify extension_dir = "D:/Program Files \/PHP5/ext" d. remove the comments of several dll Files: extension = php_bz2.dll extension = php_gd2.dll extension = php_gettext.dll extension = php_mbstring.dll extension = php_openssl.dll extension = php_sockets.dll extension = php_xmlrpc.dll e, set China time zone: date. timezone = prc f, save 4.2 Integration Apache + PHP, configure Apache h Ttpd. conf a. in the # LoadModule ssl_module modules/mod_ssl.so line, add the dll file for php to point to: LoadModule php5_module "D:/Program Files/PHP5/php5apache2_2.dll" B. find "AddType ", add a new row and enter the file type AddType application/x-httpd-php that allows php execution. php AddType application/x-httpd-php. html AddType application/x-httpd-php. php3 AddType application/x-httpd-php. htm AddType application/x-httpd-php. php4 AddType application/x-httpd-php. php5 c. search "DirectoryIndex" to change the default homepage to DirectoryIndex. php index.html d. save httpd. conf file 4.3. copy the dll file to the C: \ Windows \ System32 directory to prevent the dll file from being found (add other dll files as needed). 4.4 restart the apache2.2 service. if the startup fails, in the cmd format, you can start the Program first in the D: \ Program Files \ Apache2.2 \ bindirectory, execute the httpd.exe-w-k start command, and view errors. 4.5 After restart, you can access http://localhost:80 If "It works!" is displayed on the page !" Indicates that apache has been installed and started successfully. If the error 403 disables webpage access, go to the D: \ Program Files \ Apache2.2 \ conf Directory, open the httpd. conf file, and remove the # ServerName localhost: 80 comment in it. Restart the service again to access http://localhost:80 You can. 5. create the index. php file under D: \ Program Files \ Apache2.2 \ htdocs and enter the following content:
    

 

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.