Blank page / Error 500

There were lot of tickets and forum posts regarding blank page/Error 500, so we decided to put together small tutorial explaining what to do in this case.

  1. In your browser, go to yourdomain.com/sitecake/<your-sc-version>/config/requirements.php. There will be either message saying “Basic server configuration needed for Sitecake to run is OK” or there will be error message about PHP version or extension or privilages… If you get error, try to fix it and check URL above again until you get “Basic server configuration needed for Sitecake to run is OK” message.
    For versions of sitecake prior to 2.4.8 check yourdomain.com/sitecake/<your-sc-version>/config/check.php URL in your browser.

  2. If there is no problem with requirements and you are still getting blank page/Error 500 try to locate sitecake.log file (there could also be possibility that errors are stored in your site root dir in error_log file). sitecake.log file should be stored in sitecake-temp//logs/sitecake.log. You can try to check for some of errors below:
    a. Maximum execution time of <X> seconds exceeded - this is probably due one of two reasons…
    - You have to many pages in your site root dir. If there are other PHP libraries/frameworks located in your site root dir that doesn’t need to be handled by sitecake, you could create .scignore file in your site root dir and add dirs/files that doesn’t need to be handled by sitecake each in new line.
    - Page you are trying to edit with sitecake is complex or contains lots of sc-content containers. You could try to simplify your page complexity (HTML structure) or simply increase maximum execution time (There are several ways to do it, just google “PHP Maximum execution time exceeded”)
    b. Allowed memory size of <X> bytes exhausted - this can also be caused by reasons stated above, so try one of two steps above. (Of course you should increase memory limit instead of execution time)
    c. open_basedir restriction in effect. (If you can’t pass login page) - Try to use some other supported session handler and set it in ‘session.save_handler’ configuration (check for sitecake/config.php file or create it by copying from sitecake/<your-sc-version>/config/default.php. Just make sure to rename file to config.php after copying). Also, you could leave ‘files’ session handler and set ‘save_path’ option inside ‘session.options’ to some dir that is readable/writable by php user (could be a subdir of site root dir).
    Eg.

     return [
     	‘session.options’ => [
     		‘save_path’ => ‘/path/to/your/site/root/some-subdir’
     	];
     ];
    

So above are basic steps that you can check if you are getting blank page/Error 500. If nothing helps, please post a ticket or post on forum.
If you are sending contents of log file it would probably be better to send it on PM to a sitecake team member or to post ticket because log could contain sensitive info about your server.

Hope this helps.

1 Like

Hello @predragleka I did all the above step but I still got the error 500… could you help me out on this. Thank you

There are a couple of more reasons for Error 500:

  1. Check if you have index.html or index.php page. Sitecake needs to know where to start.
  2. Validate HTML (https://validator.w3.org/) Sitecake will not work if you haven’t closed your HTML tags properly.
  3. Check if you uploaded all files from the Sitecake zip. Sometimes it happens that FTP software fails to upload all files. Uploading zip and extracting on the server is the best way to do this part.
  4. If you have too many too large images (straight from the camera) it may take too much time for Sitecake to process them. This is max execution time issue.
  5. If you have Wordpress blog on your website don’t expect things to work. Sitecake will try to make sense of Wordpress php files and fail. Generally do not manage a website with two different CMSs at the same time.
  6. If you have several websites in the same root Sitecake will try to manage them all and fail. For example:

old-website/
my-wifes-website/
blog/
css/
images/
sitecake/
index.html
sitecake.php

This example from above would not work. Keep in the root folder just the website you want to manage with Sitecake, not all other websites you have.

  1. If you have too many files, too many php files, libraries folders… use .scignore to exclude them from processing. .scignore for the example from above would contain three lines:

old-website/
my-wifes-website/
blog/

This will tell Sitecake not to process these three folders. Read more here Sitecake Documentation: Sitecake Website Integration

  1. Permissions issue. Sitecake is php and it needs permissions to read, write and execute. Generally 644 for files and 755 for folders works out of the box. This is working fine: