1.
Question: I have followed the steps to install the Unix version of the APACHE module, but my PHP script source code is displayed in the browser, or the browser prompts me to save the file. Why?
Answer: This is caused by the PHP module not working properly. Please check the following three places:
Please confirm that the running APACHE executable file is the one you compiled successfully last time. Enter the following command:
/path/to/binary/httpd -l
If you don’t see mod_php3.c in the list, you are not running a correct executable file.
Please make sure you have added the correct "Mime Type" to one of your .conf. This should look like:
AddType application/x-httpd-php3 .php3
Please make sure that the "AddType" above is not in the or block, otherwise this AddType will only take effect in the current Virtualhost or Directory.
2.
Q: I have installed PHP according to the instructions, but my PHP still cannot work with IIS. Why?
Answer: You must ensure that the user who needs to run PHP has sufficient permissions to run php.exe. The IIS server uses an anonymous account created during installation. This account requires permission to run php.exe. In addition, any authenticated user also has permission to run php.exe.
3.
Q: How to compile PHP with APACHE 1.3.X?
A: This is very simple, just follow the steps below:
- Get the latest APACHE distribution package from the APACHE site
- UNZIP/UNTAR file to a directory, such as /usr/local/src /apache-1.3.9
- Enter "./configure --with-apache=/path/to/your/apache" to start compiling PHP for the first time
- Execute "make", "make install" in sequence , create and copy the necessary files to the APACHE directory
- Enter the APACHE directory and edit the Configuration file. Add at the end of the file: "AddModule modules/php3/libphp3.a"
Execute "./Configure", "make"
Everything is done, you already have an APACHE executable file that can run PHP
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, again Add:
AddType application/x-httpd-php3 .php3
to the global section of httpd.conf, or to the section where you need to provide PHP support.
6.
Q: How to use the MAIL function to send emails under WINDOWS?
Answer: PHP uses the SENDMAIL program to send emails under UNIX/LINUX. There is no SENDMAIL in WINDOWS, but it can be done using the SMTP protocol. The specific method is as follows: Modify SMTP under [mail function] in the PHP.INI file.
For example:
[mail function]
SMTP=public.sta.net.cn;Win32 Only
7.
Question: How to set up php apache under win9x
appears: "cannot determine local host name, use servername to set it manually"
If you have an IP address, just add it to httpd.conf:
ServerName http://your IP
For example: ServerName http://162.105.38.100
http://www.bkjia.com/PHPjc/531755.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531755.htmlTechArticle1. Question: I have installed the Unix version of the APACHE module according to the steps, but my PHP script source code is displayed in in the browser, or the browser prompts me to save the file. Why? Answer: This is...