Solution to integration errors of apache2.2 and php5.2.17 in Windows

Source: Internet
Author: User

CopyCodeThe Code is as follows: loadmodule php5_module D:/phpdir/php5apache2_2.dll
Addtype application/X-httpd-PHP. php

Phpdir is your PHP installation directory. Change it to your own directory as needed. After completing the preceding configuration, open Apache and create the index. php file in the htdocs directory of Apache. The content is as follows:Copy codeThe Code is as follows: <? PHP phpinfo ();?>

Enter http: // localhost/index. php In the browser to display the PHP information. This is the integration steps and methods of Apache and PHP under normal circumstances.

However, I encountered an error during integration on Windows recently (apapche is 2.2.15 and PHP is 5.2.17). I added the PHP module to the Apache configuration file and then opened Apache to report an error, error displayed: the requested operation has failed!

At first, I thought it was a problem of compatibility between APACHE and PHP versions. After I changed to a lower version of PHP and a higher version, the problem still exists after I changed to an earlier version of Apache, obviously, this guess is incorrect to some extent. Later, I accidentally changed the threadsafe version of PHP, and the problem disappears magically, because the non-thread safe version has been used all the time before, and this can also cause troubles. That is to say, to integrate the thread safe version of PHP on Windows platforms, do not use the non-thread safe version. I don't know why!

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.