Home  >  Article  >  Backend Development  >  The laravel project runs well locally. After uploading to the server, accessing the homepage displays a blank page with no error.

The laravel project runs well locally. After uploading to the server, accessing the homepage displays a blank page with no error.

WBOY
WBOYOriginal
2016-10-11 14:02:101420browse

laravel5.2 projectwindows runs normally locally, but after uploading to the server, accessing the homepage shows a blank page with no errors (except for chrome reporting HTTP ERROR 500, and browsers such as Firefox and IE reporting no errors). Make sure the laravel directory has been changedbootstrap/cache and storage have permissions of 777.

<code>chmod -R 777 bootstrap/cache
chmod -R 777 storage</code>

The laravel project runs well locally. After uploading to the server, accessing the homepage displays a blank page with no error.

The server-side environment is ubuntu14.04+apache+mysql+php5.5.9. Checking the error log error.log of the server apache2 earlier seems to show a syntax error. How can there be a syntax error when the local test is normal? So I guessed that it might be a php version issue that caused the syntax error, because the local Windows version is php5.6.23, while the server version is php5.5.9. So I tried upgrading PHP to 5.6. The problem was that there were not many PHP version upgrade methods available on the Internet. The upgrade failed and some server files were messed up. I could only roll back the snapshot from the Alibaba Cloud console. Return to earlier state.

I tried a few more methods just now but it still doesn’t work. I checked the apache error log and found that there was no error in the log (a bit weird because of the previous syntax error). When I visited the laravel project homepage, it was still blank. What is even more puzzling is that the laravel5.2 version of the project that I put up a few months ago is running well on the server.

Is it the reason why laravel automatically updates and upgrades? Because after a comparison, I found that the route directory and several other directories of the project a few months ago and the current project have changed (different).

The laravel project runs well locally. After uploading to the server, accessing the homepage displays a blank page with no error.
The laravel project runs well locally. After uploading to the server, accessing the homepage displays a blank page with no error.

If you can’t find a solution to the problem, please solve it. Thanks in advance!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn