HTTP ERROR 500 on new installation

Yet another 500 error on installation. Reading through this forum I have seen a few of these, but no real solution. The error in the apache log is:

[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/public_html/sitecake/2.3.1/config/check.php on line 22
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP Stack trace:
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP 1. {main}() /var/www/public_html/sitecake.php:0
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP 2. require() /var/www/public_html/sitecake.php:1
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP 3. require() /var/www/public_html/sitecake/2.3.1/src/app.php:6
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP 4. require() /var/www/public_html/sitecake/2.3.1/config/bootstrap.php:3
[Mon Jun 06 10:05:11 2016] [error] [client 159.191.248.33] PHP 5. trigger_error() /var/www/public_html/sitecake/2.3.1/config/check.php:22

The first line in this indicates a permissions issue, so I chmod -R 777’d the entire directory, all of the files, all of the subdirectories (for diag). That did not solve this error. Additionally, I tried turning on ftp access in the config.php and gave ownership of this entire directory/subs/files to the FTP user. This also did not alleviate this 500 server error.

I also noticed in the latest update (2.3.1), the default entry point filename is sitecake.php, but in the config.php, it’s listed as admin.php. My understanding is that these should match, so I changed them accordingly. This still did not fix the 500 error.

I have yet to get this software working and I’m having some serious buyers remorse. 20 bucks is WAY too high of a price for software that does not work out of the box and provides little to no installation instructions.

Please advise ASAFP. Thanks.

–Micah

Hi Micah,

we figured a bug in current release when checking path to site root dir. It is fixed and will be included in next release that will be out in next couple of days.
You are right regarding entry point value in config file. Not sure why these don’t match. Will investigate for next release.

As for permissions bug, you can fix it by changing line #20 in sitecake/2.3.1/config/check.php
if(!is_writable('../') || !is_readable('../'))
replace with
$rootSiteDir = realpath(dirname(__FILE__) . '/../../../'); if(!is_writable($rootSiteDir) || !is_readable($rootSiteDir))

Regards

If you have a SELinux policy in place try to set it into permissive mode and see if that allows it to run and if it does set it back to enforcing and relabel the context

example:
https://wiki.centos.org/HowTos/SELinux#head-0f6390ddacfab39ee973ed8018a32212c2a02199

could you ssh into your server and provide the output of the following commands

httpd -v
php -v
sestatus