PHP Installation Guide: Frequently Asked Questions (1)_PHP Tutorial

WBOY
Release: 2016-07-21 16:02:36
Original
807 people have browsed it

1.

Question: I have installed the Unix version of the APACHE module according to the steps, 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 user who needs to be verified also has permission to run php.exe.


3.

Q: How to compile PHP with APACHE 1.3.X?

A: It's easy, just follow these steps:

- Get the latest APACHE distribution package from the APACHE site
- UNZIP/UNTAR file to a directory, e.g. /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" sequentially ","make install", 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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316547.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...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!