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

WBOY
Release: 2016-10-10 11:56:14
Original
2626 people have browsed it

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>
Copy after login
Copy after login

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!

Reply content:

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>
Copy after login
Copy after login

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!

The problem has been solved. It is the php version problem that I guessed before. Upgrading php5 to php5.6 or above will solve the problem.

Attached is the correct way to upgrade php5.5 to php5.6:

<code>sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install libapache2-mod-php5.6
sudo a2dismod php5
sudo a2enmod php5.6
sudo add-apt-repository ppa:ondrej/php5-compat
sudo apt-get update
sudo apt-get dist-upgrade</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!