0
+Apache2 +PHP5.5 +Laravel4 

After installing laravel, I go to http://localhost and chrome gives me an ERR_EMPTY_RESPONSE error.

If I create in the public folder an index2.php file that just echo "hello", it works fine!

Everytime I try to access localhost, a line like this is added in the Apache's log:

[Sat Jul 26 14:38:37.083511 2014] [core:notice] [pid 9562] AH00051: child pid 10025 exit signal Segmentation fault (11), possible coredump in /etc/apache2

and this crash happens:

These are my conf files:

apache2.conf

<Directory /servidor/show/public> AllowOverride All allow from all Options +Indexes Require all granted </Directory> 

000-default.conf

<VirtualHost *:80> DocumentRoot "/servidor/show/public" ServerName tadflex.dev ServerAlias tadflex.dev <Directory "/servidor/show/public"> AllowOverride All allow from all Options +Indexes Require all granted </Directory> </VirtualHost> 

.htaccess

<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On RewriteBase /public/ # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </IfModule> 

I've been for the last 2 days trying to do everything I found in stackoverflow threats... but nothing helped.

I have tried re-installing apache but it didn't work.

Do you have any clue what may be going on?

Thanks

6
  • Did you check for any APC incompatibility with your php version? Commented Jul 26, 2014 at 14:17
  • Thanks for answering Dimitris; how can I check that? Commented Jul 26, 2014 at 14:24
  • you can check it with phpinfo(); or you could if(extension_loaded('apc') && ini_get('apc.enabled')) { echo "APC enabled!"; }. Also, have you tried in any other browser than chrome? Commented Jul 26, 2014 at 15:38
  • Does it work with Firefox or Safari? I remember myself fighting with ERR_EMPTY_RESPONSE and Chrome before. Commented Jul 26, 2014 at 18:31
  • Thanks both for your answer; Firefox gives a"not server found" error. It seems I don't have APC installed, I can't find it at all in the phpinfo(), and when I execute a script with that condition it returns a white page... Can it be a problem with Composer? how can I check it? Commented Jul 26, 2014 at 18:45

3 Answers 3

2

Hello try to increase the memory of your .htaccess file

php_value memory_limit 128M

Options -MultiViews

 php_value upload_max_filesize 500M php_value post_max_size 1000M php_value memory_limit 128M RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] 

Sign up to request clarification or add additional context in comments.

1 Comment

You give me the clue! Increasing memory limit in my php.ini limit avoid segmentation fault. Then I get other errors on /var/log/apache... related to permissions. Chmod solve them and now the app is running
1

Maybe unrelated to your situation, but I encountered this ERR_EMPTY_RESPONSE error myself when deploying my Laravel 5.3 project to my VPS.

When calling the support desk of my hosting, they were able to detect that the error was caused by OPCache (specifically a zend_mm_heap corrupted error). After disabling OPCache in my .htaccess the error disappeared (see .htaccess file below).

If anybody knows more regarding this matter, please let me know!

Please note that disabling OPCache will decrease performance, for more information see this Stackoverflow post.

.htaccess

<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> php_flag opcache.enable Off RewriteEngine On # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule> 

Comments

0

I had exactly the same error in chrome and a "can't open page" in Safari.

Went through the bootstrap code and found out that loading the compiled.php was the cause. The file had some errors in it.

As "php artisan optimize --force" didn't help (rebuilt the file) I just commented out the loading of it in autoload.php.

Might not solve the root cause but at least help to get started with laravel.

1 Comment

I'm not convinced this is answering the OPs question?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.