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?