Apache cannot parse the PHP file

Source: Internet
Author: User

PHP can not parse the judgment fault
1./usr/local/apache/bin/apachectl-m//View there is no load php5_module (shared) module;
2. Under the/usr/local/apache2/modules/directory, see if the libphp5.so module is loaded;
3. Review the compiled configuration file. No error:/usr/local/apache2/conf/httpd.conf
Modify the Apache configuration file httpd.conf
vim/usr/local/apache2/conf/httpd.conf
found in httpd.conf: "AddType application/x-gzip. Gz. tgz" is added below the line
"AddType application/x-httpd-php. php"
Find further : "DirectoryIndex index.html", modify this line to
"DirectoryIndex index.html index.htm index.php"
Find again: "#ServerName www.example.com:80" changed this line to
"ServerName localhost:80" save back
4. Use the command to see if the Master profile is incorrect:/usr/local/apache2/bin/apachectl-t
5. When compiling and installing Apache, it is recommended to add two parameters (no need to compile later):
--enable-modes-shared=most//Compile the most loaded modules
--enalbe-modes-shared=all//compile and load all modules
In short, after the failure, the first to determine the cause of the problem, so that there is a way to deal with.



/usr/local/apache2/bin/apachectl-m: See which modules are installed

/usr/local/apache/bin/apachectl-v: Viewing the mode used

/usr/local/apache2/bin/apachectl-t: Checking for syntax errors

/usr/local/apache2/bin/apachectl-l: Viewing the installed library files

/usr/local/apache2/bin/apachectl Graceful: Reload configuration

/usr/local/apache2/htcocs Home Store Directory

/usr/local/apache2/bin/apachectl Startup file directory


Apache cannot parse the PHP file

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.