PHP installation tips: FAQs (1)

Source: Internet
Author: User
I. Q: I have installed the apache (the most popular WEB server platform on the Unix platform) module on a step-by-step basis, but my php (as the mainstream development language) the script source code is displayed in the browser, or the browser prompts me to save the file. Why? A: This is because the php (as the mainstream development language) module does not have SyntaxHighlighter I,

Q: I have installed the Unix version of apache (the most popular WEB server platform on the Unix platform) module by step, but my php (as the mainstream development language) the script source code is displayed in the browser, or the browser prompts me to save the file. Why?

A: This is because the php (as the mainstream development language) module does not work properly. Check the following three items:

Make sure that the running apache (the most popular WEB server platform on Unix) execution file is the one that you compiled successfully. Run the following command:
/Path/to/binary/httpd-l
If you do not see mod_php (as the current mainstream development language) 3. c in the list, then you have not run a correct execution file.
Make sure that you have added the correct "Mime Type" to one of your. conf files. This should be like:
AddType application/x-httpd-php (as the mainstream development language) 3. php (as the mainstream development language) 3
Make sure that the above "AddType" is not in the OR block; otherwise, this AddType takes effect only in the current Virtualhost or Directory.


II,

Q: I have installed php as instructed (as the mainstream development language), but my php (as the mainstream development language) I still cannot work with iis (Microsoft's WEB server platform). why?

A: Actually, you need to run PHP. users who are currently using the development language have sufficient permissions to run PHP. (execute the current development language cmd.exe. Token permission. In addition, any authenticated users have the right to run PHP (.exe, the current development language.


III,

Q: How to compile php with apache (the most popular WEB server platform on the Unix platform) 1.3.X (as the mainstream development language )?

A: This is simple. you only need to follow the steps below:

-Obtain the latest apache (the most popular WEB server platform on Unix) distribution package from apache (the most popular WEB server platform on Unix ).
-UNZIP/UNTAR files to a directory, such as/usr/local/src/apache (the most popular WEB server platform on the Unix platform)-1.3.9
-Enter ". /configure -- with-apache (the most popular WEB server platform on the Unix platform) =/path/to/your/apache (the most popular WEB server platform on the Unix platform) "compile php for the first time (as the mainstream development language)
-Execute "make" and "make install" in sequence to create and copy the necessary files to the directory of apache (the most popular WEB server platform on Unix ).
-Go to the directory of apache (the most popular WEB server platform on the Unix platform) and edit the Configuration file. Add "AddModule modules/php (as the current mainstream development language) 3/libphp (as the current mainstream development language) 3.a" to the end of the file"
Run "./Configure", "make"

Everything is done. you already have an apache (the most popular WEB server platform on Unix) file that can run php (as the mainstream development language ).

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.