Thinkphp has a strange 500 error.

Source: Internet
Author: User
Tags blank page using git
Thinkphp has a strange 500 error because a project is made in the thinkphp2.0 environment.

Now we need to use git to submit the version for development.

So I encountered a strange problem. I put the file in a git initialization Directory, submit it to the server using git, and then use the hook to synchronize it to the WWW directory, for real-time viewing. If you submit the request using git, you can view the homepage on a blank page, and echo, phpinfo, and others are normal.

After I directly upload the file to the www directory, the file can be loaded and accessed normally, without any problems.

Only the hooks that use git are submitted. 500 Internal Server Error.

It is strange that no nginx error logs have been viewed.

How can this problem be solved?


Reply to discussion (solution)

Will it be a permission issue?
The default nginx user group is www: www.
Git should be git: git.

Not sure. It's just an idea.

The Runtime directory cannot be placed in the version control system.

The Runtime directory cannot be placed in the version control system.

How can this problem be solved? I finished it online first, and then pulled it online to Git?

The content in the Runtime directory will be rewritten when the program is running.
If you put it under version control, it is obviously a problem.

The content in the Runtime directory will be rewritten when the program is running.
If you put it under version control, it is obviously a problem.
So we can modify the specified default Runtime directory during initialization?

What's wrong with you?
The Runtime directory is the working directory of thinkphp and must have the write permission.
If this directory does not exist, thinkphp will create it by itself.

When you put the Runtime directory in version control, it becomes read-only. how can this work normally?

What's wrong with you?
The Runtime directory is the working directory of thinkphp and must have the write permission.
If this directory does not exist, thinkphp will create it by itself.

When you put the Runtime directory in version control, it becomes read-only. how can this work normally?
When I use a git hook for synchronization, I use a hook to force a WWW. www directory with 755 permissions.

Can you enable the error display function of php and check the error message?

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.