Just installed sitecake and have a php error message

Hi
I’ve just bought Sitecake
I have installed it on my domain as per the instructions. I have set it to PHP 5.6
However, when I try and run it (www.domain.com/sitecake.php) it comes up with the following two error messages

Warning: is_writable(): Unable to find the wrapper “tcp” - did you forget to enable it when you configured PHP? in file [SITE]/sitecake/2.3.4/src/Sitecake/SessionServiceProvider.php on line (#114)

RuntimeException: Failed to start the session because headers have already been sent by “[SITE]/sitecake/2.3.4/src/Sitecake/Error/ErrorHandler.php” at line 238. in file [SITE]/sitecake/2.3.4/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php on line (#144)

Do you have any idea why it won’t run?
Thanks in advance

It looks like your PHP is setup to use memcache for session storage. You should set config inside sitecake/2.3.4/config/config.php. On line #23 change ‘files’ to ‘memcache’. Let me know if this helps.
You can confirm ‘session.save_handler’ setting via phpinfo()

Hi.

Thanks for your help

OK - changed the config file line 23 from files to memcache

Now the login popup comes up

However, when I enter admin, it just says Error

I followed the instructions and renamed credentials.php.default to credentials.php and tried again

This time it came up with this error message

Notice: Undefined offset: 0 in file [SITE]/sitecake/2.3.4/src/Sitecake/Auth/Auth.php on line (#47)

I looked at the files and notice that the original credentials.php had this content

<?php $credentials = "d033e22ae348aeb5660fc2140aec35850c4da997"; ?>

and the credentials.php.default fle has this content

<?php // This is the default sitecake password 'admin' given as the sha1 hash. // In case you lost/forgot the current password, replace the content of // the credential.php file with this one. $credential = "d033e22ae348aeb5660fc2140aec35850c4da997"; ?>

Note that the credentials.php file has $credentials = (with an S) and the default file has $credential = (without an S)

If I remove the S I have this error message
Notice: Undefined offset: 0 in file [SITE]/sitecake/2.3.4/src/Sitecake/Auth/Auth.php on line (#47)

If i leave the S in, I get Error when I enter admin as the password

Any ideas?

Also, this error message shows when the credentials.php file has the S ($credentials =)

Notice: MemcachePool::get(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: Connection refused (111) in file [SITE]/sitecake/2.3.4/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php on line (#82)

Thanks

Hi, it should be $credentials (with S). We will fix this in next release. Can you set it on your site and then let me know what happens. You can send me sitecake-temp/logs/sitecake.log file on PM. Also include website URL and pass so I can check it out.

Hi, problem was in session.options.servers configuration. Server details should be set inside this option when using memcache

$app['session.options'] = [ 'servers' => [[ip, port]] ];

Hi - fantastic - it’s now all working

Thanks for your help

For anyone who has the same problem - your server uses memcache (whatever that means), here’s a three step solution

  1. In sitecake/2.3.4/config/config.php. On line #23 change ‘files’ to ‘memcache’

  2. Next, you need to get the ip and port

To do this, create a file with these 3 lines only

<?php phpinfo(); ?>

Save the file as phpinfo.php and upload it to your server, then access the file in the web browser

Lots of information wlll come up

Search for

session.save_path

This will show you something like this

tcp://10.168.1.95:11221?

The first set of four numbers is the ip address (in my case 10.168.1.95) and the second part (after the colon) is the port address (in my case 11221)

Jot down the ip address and port

  1. In the same config.php file, change line 63 from

$app[‘session.options’] = [];

to (in my case)

$app[‘session.options’] = [
‘servers’ => [[‘10.168.1.95’, 11221]]
];

Then, it will all work