A strange 500 error problem with thinkphp

Source: Internet
Author: User
Because a project is done by the thinkphp2.0 environment.

Now you're going to use Git to commit the version to develop.

So there is a strange problem, I put the file in a git initialization directory, using Git to submit to the server, and then use the hook to synchronize it to the WWW directory, for real-time viewing. Using Git to submit the past, to see the homepage is a blank page, and echo,phpinfo anything is normal.

After I upload the file directly to the WWW directory, I can load the access normally, without any problems.

Only use Git's hooks to submit the past is Internal Server Error.

It is strange to see the error log for Nginx.

How do you do it?


Reply to discussion (solution)

Is it a privilege issue?
Nginx Default User group is Www:www
Git is supposed to be git:git.

Not sure. Just a thought.

The Runtime directory cannot be placed in the version control system

The Runtime directory cannot be placed in the version control system

How to solve it? Do it online, then drag the line into git?

Content in the runtime directory is overwritten when the program is run
If you put it under version control, it's obviously going to be a problem.

Content in the runtime directory is overwritten when the program is run
If you put it under version control, it's obviously going to be a problem.
What about modifying the default runtime's specified directory at initialization time?

What's the matter with you?
Runtime Directory is the working directory of thinkphp and must have write permission
When this directory is not available, thinkphp creates it itself

When you put the runtime directory into version control, it becomes read-only, and how does it work correctly?

What's the matter with you?
Runtime Directory is the working directory of thinkphp and must have write permission
When this directory is not available, thinkphp creates it itself

When you put the runtime directory into version control, it becomes read-only, and how does it work correctly?
When I synchronize with git hooks, I use hooks to force the directory to a WWW.www, with 755 permission.

Would you please open the error display function of PHP and look at the error messages?

  • 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.