Sitecake installation on (IIS, PHP 5.5) shows only an empty page

Hello,

I am trying to install site cake 2.3.1 on an IIS.

Environment

IIS 8
Windows Server 2012 R2 Standard Edition (x86)
PHP Version 5.5.36 (php.info is shown correctly).

Setup

  1. Added index.html
    <!DOCTYPE html>
    <html><head><title>Title</title>
    </head><body>
    <div class=“sc-content”>
    <h1>Fine looking heading</h1>
    <p>Some text</p>
    </div>
    </body>
    </html>

  2. Created directories and copied sitecake to the directory as descibed in documentation: http://sitecake.com/docs/install.html

/css
/images
/js
/sitecake
index.html
sitecake.php

Problem

Firefox Network Analyzer says: “Status Code 500 - Internal Server Error”. But unfortunately, there is nothing logged to the IIS log files…

Any ideas how to further analyze the problem?

Hi,

we figured a bug in last 2.3.1 release regarding file permissions. It is fixed and will be out in next release that should be out in next couple of days. Check if there is a file in sitecake-temp/logs. If not problem is probably one I just mentioned. If there is a log filecheck there for an error or post it here so we can check it out

v2.3.2 just released. please update and see if it works now.

Thanks for the fast response and the update.

Unfortunately, the new version shows the same behavior - trying to access the page “ip/sitecake.php” shows just an empty page (ErrorCode 500 - Internal Server error). The folder “sitecake-temp” does not contain any files or folders. As mentioned above, the index.html page as well as php.info are shown correctly.

Do I have to install any other modules?
Do I have to set any special restrictions?

I also had this problem with new version. im Checking my extended server log to see if i can gain some technical data and i am also going to test on a few other servers for consistency

okay on server 1 i am running sitecake 2.11 and its running fine and on 2.32

PHP version 5.5
Warning: ini_set(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts//:/tmp/) in file [SITE]/sitecake/2.3.2/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php on line (#55)

Warning: mkdir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path(s): (/var/www/vhosts//:/tmp/) in file [SITE]/sitecake/2.3.2/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php on line (#52)

that was on a Centos 6 server
Apache/2.2.15 (Unix)

Server 2

Centos 7 64 bit
httpd (Apache) Server version: Apache/2.4.6 (CentOS)

PHP 5.4.16 (cli) (built: May 12 2016 13:45:17)
Copyright © 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2013 Zend Technologies

I am Getting 500 Internal Server Error on this Server

here is some log information

[Sat Jun 11 11:46:36.638416 2016] [:error] [pid 26521] [client 172.16.0.120:33368] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:46:38.737766 2016] [:error] [pid 26527] [client 172.16.0.120:33371] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:46:46.087735 2016] [:error] [pid 18859] [client 172.16.0.120:33383] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:46:47.692867 2016] [:error] [pid 29466] [client 172.16.0.120:33384] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:47:40.107802 2016] [:error] [pid 28109] [client 172.16.0.120:33393] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:47:41.945022 2016] [:error] [pid 28110] [client 172.16.0.120:33394] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:51:43.258101 2016] [:error] [pid 28112] [client 172.16.0.120:33410] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:51:47.287041 2016] [:error] [pid 28113] [client 172.16.0.120:33411] PHP Fatal error: mbstring lib (PHP extension) is required for Sitecake to run. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 23
[Sat Jun 11 11:51:56.687904 2016] [:error] [pid 28345] [client 172.16.0.120:33413] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:51:57.517847 2016] [:error] [pid 28346] [client 172.16.0.120:33414] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:53:17.017208 2016] [:error] [pid 28347] [client 172.16.0.120:33423] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:53:17.730973 2016] [:error] [pid 28348] [client 172.16.0.120:33424] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:54:20.511294 2016] [:error] [pid 28349] [client 172.16.0.120:33431] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:00.504828 2016] [:error] [pid 28438] [client 172.16.0.120:33435] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:01.147256 2016] [:error] [pid 28439] [client 172.16.0.120:33436] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:01.574208 2016] [:error] [pid 28440] [client 172.16.0.120:33437] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:01.925260 2016] [:error] [pid 28441] [client 172.16.0.120:33438] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:02.058318 2016] [:error] [pid 28442] [client 172.16.0.120:33439] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:02.695858 2016] [:error] [pid 28438] [client 172.16.0.120:33440] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:03.277337 2016] [:error] [pid 28439] [client 172.16.0.120:33441] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:14.120435 2016] [:error] [pid 28440] [client 172.16.0.120:33442] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:30.869858 2016] [:error] [pid 28441] [client 172.16.0.120:33443] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:32.122864 2016] [:error] [pid 28442] [client 172.16.0.120:33444] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 11:55:37.878313 2016] [:error] [pid 28535] [client 172.16.0.120:33445] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hidden/public_html/sc/sitecake/2.3.2/config/check.php on line 29

After installing the mbstring lib PHP extension it gave me issues about the directories being readable and writable so i tried to chmod -R 777 and still got a 500. Checking the Selinux policy now. for a confliction

[root@server2 resources]# setenforce 0
[root@server2 resources.]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28

It appears that setting selinux into permissive mode (not reccomended) Fixed the Problem on server 2

So i would reccomend if you are using SELinux to relabel the security context on the sitecake directory

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

Although on Server 1 There is no Selinux policy.

Details from Server 3 Installation.

Centos 6 Server 64 bit (Different Server than server 1, Server 1 is a 2gb ram dual core vps and server 3 is a 8gb ram hex core vps) There is no SELinux policy in effect on this machine either
PHP 5.6.21 (cli) (built: Apr 29 2016 10:47:10)
Copyright © 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright © 1999-2016, by Zend Technologies
Server version: Apache/2.2.15 (Unix)

After installing sitecake 2.32 on a fresh template in a test directory i get a 500 internal server error.

Checking logs now…

[Sat Jun 11 12:02:05 2016] [error] [client 167.xxx.xxx.xxx] File does not exist: /var/www/hiddensite/public_html/favicon.ico
[Sat Jun 11 12:05:43 2016] [error] [client 167.xxx.xxx.xxx] File does not exist: /var/www/hiddensite/public_html/sc/assets/js/modernizr.js, referer: http://hiddensite/sc/
[Sat Jun 11 12:05:43 2016] [error] [client 167.xxx.xxx.xxx] File does not exist: /var/www/hiddensite/public_html/sc/assets/ico
[Sat Jun 11 12:05:52 2016] [error] [client 167.xxx.xxx.xxx] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hiddensite/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 12:05:55 2016] [error] [client 167.xxx.xxx.xxx] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hiddensite/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 12:06:05 2016] [error] [client 167.xxx.xxx.xxx] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hiddensite/public_html/sc/sitecake/2.3.2/config/check.php on line 29
[Sat Jun 11 12:06:06 2016] [error] [client 167.xxx.xxx.xxx] PHP Fatal error: Root site directory have to be readable and writable. in /var/www/hiddensite/public_html/sc/sitecake/2.3.2/config/check.php on line 29
So i did a chmod -R 777 on the websites /sc directory that is holding thesitecake website and the editor and the Software is functioning fine now.

but hopefully this technical data can help.

I was able to get sitecake 2.32 running on 2 out of 3 servers. sitecake 2.11 still functions fine on the one server that does not work with 2.32

tachyon,

I would check what user that IIS is running as and verify that it can properly read and write to those folders, and also check the file permissions

Alternatively

https://httpd.apache.org/docs/current/platform/windows.html

http://windows.php.net/download/

if running IIS is not critical

Alternatively if you have another ip address (if iis is critical) you can use a decent workstation and install centos on it and run it that way.

if you can provide the section in your logs related to the sitecake errors
that would also be useful.

https://portal.smartertools.com/kb/a2487/where-are-my-iis-log-files-stored.aspx

@tachyon, can you provide url? Maybe phpinfo page? You can also check pre-requirements on yourdomain.ext/sitecake/2.3.2/config/check.php. If it passes, please provide link and phpinfo page so we can try to figure it out.

Regards

@nick314, Regarding first server where you couldn’t manage to get sitecake running. As I can ses from log entries, problem is that php user doesn’t have permission to session path stored in php settings. Configuration regarding session can be changed in sitecake/2.3.2/config/config.php file.
You can use some other supported session handler and set it in $app[‘session.save_handler’].
Also, you could leave files session handler and set save_path option inside $app[‘session.options’] to some dir that is readable/writable by php user.

Regards

@predragleka Server 1 is also managed by Plesk software. i was able to temporarily resolve the issue by removing the restriction on open_basedir. I am also looking into work around methods on this issue. Thank you for the Input and response. I think a lot of these “500” errors are server misconfigurations or as you stated, configuration workarounds.