Home >Backend Development >PHP Tutorial >PHP installation PHP installation guide: Frequently asked questions (2)
4.
Question: When I compile PHP and APACHE together, there seems to be a problem. It always says that the httpd.h file cannot be found, but in fact the file does exist. Why?
A: You need to let the PHP configuration/installation script know the top-level directory of your APACHE source code, not the directory containing the httpd.h file. That is, "--with-apache=/path/to/apache/" should be specified instead of "--with-apache=/path/to/apache/src".
5.
Q: I installed PHP using RPM, but APACHE cannot process PHP files. Why?
Answer: Assuming you have installed PHP correctly using RPM, then you must back-note or add the following lines to the httpd.conf file:
#Extra Modules
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perlc.
# Extra Modules
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so
LoadModule perl_module modules/libperl.so
In addition, add:
AddType application/x-httpd-php3 .php3
To the global of httpd.conf section, or to the section where you need to provide PHP support.
The above introduces the PHP installation PHP installation guide: FAQ (2), including the content of PHP installation. I hope it will be helpful to friends who are interested in PHP tutorials.