I am unable to get Symfony 2.x running in the prod environment on my MacBook.
localhost/app_dev.php
runs fine and check.php
etc but not prod.
I have tried all the usual fixes, such as chmod -R 777
, 775
etc on my /Users/user/Sites
folder. I have chown the folder to _www:_www
recursively as well. I have also tried adding FollowSymLinks
and Allowoverride
to VHOSTs and my user conf in Apache. but still no luck.
The "error" I get is....
The connection was reset
The connection to the server was reset while the page was loading.
Nothing more, nothing less. No errors in the log files (symfony prod & apache), nothing.
Like I said though… dev environment works fine. On my Windows and Linux machines both environments work perfectly, only problems on the Mac.
UPDATE: With a bit of debugging, I found that app.php is being called, but it seems to "crash" at the following line
$response = $kernel->handle($request);
Well, Symfony is a PHP framework correct? My first suggestion is to not deal with the built in Mac OS X Apache/PHP setup & instead use MAMP. It’s a self contained Mac version of a LAMP (Linux, Apache, MySQL & PHP) environment. And it is far more on par with the real world of web development than Apple’s built-in tools go.
That said, to diagnose your current setup, I think you should check headers from the requests you are making to see what is truly happening. You would do this using curl -I
like this:
curl -I localhost/app_dev.php
Or like this:
curl -I localhost/check.php
Also, are you checking the Apache & PHP logs? Might glean more clues from those. As it stands, my best recommendation to get you back on track is to use MAMP instead of this type of setup.