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!