Have you followed the Upgrade Guide?
Does the bootstrap/cache directory exist? Did you create it? And is it writeable?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hey guys,
I'm having a really weird issue with Laravel 5 (.0 and .1) on a fresh Ubuntu 14.04 server with Apache 2.4.7.
When I first deployed the project (that works just fine), I got a "500 Internal Server Error" response from every route of the app. The log says:
[fastcgi:error] [pid 14334] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:41395] FastCGI: comm with server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-yyy.yyy.yyy.yyy-80-domain.com" aborted: read failed
[fastcgi:error] [pid 14334] [client xxx.xxx.xxx.xxx:41395] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-yyy.yyy.yyy.yyy-80-domain.com"
[fastcgi:error] [pid 14334] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:41395] FastCGI: comm with server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-yyy.yyy.yyy.yyy-80-domain.com" aborted: read failed
[fastcgi:error] [pid 14334] [client xxx.xxx.xxx.xxx:41395] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-yyy.yyy.yyy.yyy-80-domain.com"
I narrowed down the cause or the error to a single line in bootstrap/autoload.php:
$compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath))
{
require $compiledPath; // this causes the server error
}
If there is a compiled.php and Laravel tries to require it, I get the 500 Error Response. As soon as I remove the compiled.php (either with php artisan clear-compiled or manually), everything works like a charm.
This is especially annoying because php artisan optimize (which creates the compiled.php) is part of my automated deploymet process. This error did not occur with Laravel 5.0 on Ubuntu 12.04 with Apache 2.2. But I was able to reproduce it with Laravel 5.0 and 5.1 on 2 separate servers with Ubuntu 14.04 an Apache 2.4
Does anybody have an clue what this sorcery is? After 2 days of debugging and googling I'm really out of ideas...
P.S.: I'm more of a 'coder guy' than a server expert, so chances are high that I'm just missing something obvious.
Please or to participate in this conversation.