Causes and Solutions of 500 errors on php Virtual Hosts

Source: Internet
Author: User
I wrote a simple php code and uploaded it to the space. However, the error 500 is displayed in apache. Google's solutions basically mean that there is a problem with file permissions. But I have read that the File Permission is 644, And the directory permission is 755. Later, another PHP file was created in the same directory and written to [code]? Phpe

I wrote a simple php code and uploaded it to the space. However, the error 500 is displayed in apache. Google's solutions basically mean that there is a problem with file permissions. But I have read that the File Permission is 644, And the directory permission is 755. Later, another PHP file was created in the same directory and written to [code lang = "js"]? Php e

I wrote a simple php code and uploaded it to the space. However, the error 500 is displayed in apache.

Google's solutions basically mean that there is a problem with file permissions. But I have read that the File Permission is 644, And the directory permission is 755.

Create another PHP file in the same directory and write

[Code lang = "js"]
Echo "test ";
?> [/Code]

No error occurs. The problem must be in the content of the target PHP file. Put the modified file in the local apache and execute it. It is found that there is less ";" after a statement. After a semicolon is added, no Error 500 is displayed. The execution is successful!

It is found that there are still many restrictions on the VM, especially the http header reply contains apache and php versions. However, this blog does not have much to do with it. If you love to attack, come on. After a while, I put my blog into vps when I was familiar with linux.

Original article address: Cause and solution of Error 500 on the php virtual host. Thank you for sharing it with me.

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.