500 internal server Symfony on production, possibl

2019-03-03 04:23发布

问题:

Running into a 500 internal server error on my subdomain installation of Symfony when I attempt to visit any modules. The server does have PHPsuexec installed on it. Does anybody know whats up? Otherwise it states that the symfony project is installed and it runs fine on my server.

One glitch could be that on my server the directories have permissions 777 and all files have 666 permissions. However, courtesy of PHPsuexec, most my directories seem to have 775 and the files a 664 permission level.

Thanks all!

Parijat

回答1:

My guesses would be:

  1. Check if you have enabled mod_rewrite and your htaccess file (strong chances to be it)
  2. Change the no_script to true in your production environment ($sf_root/apps/app_name/config/settings.yml) , clear cache and try again
  3. Try using the php symfony proj:perm on your project after trying everything else.

Hope this helps



回答2:

PHPsuexec servers do not allow directory permissions to be 'looser' than 0755 and file permissions cannot be 'looser' than 0644. Check the permissions set on all the dirs and files in the symfony installation, and modify to meet this requirement.

Next, symfony has permissions of 0777 & 0666 hard-coded into its files. You must change these permissions in symfony's code so that symfony does not make the permissions 'too loose' on dirs and files in the future.

Please read this documentation: http://trac.symfony-project.org/wiki/SymfonyPHPsuexec

Long discussion here: http://oldforum.symfony-project.org/index.php/m/45845/index.html