Login & open_basedir restriction troubles

Hi !

Thanks for this awesome CMS!

I have a little problem while installing on the server. (sitecake 2.4.5 whitelabel)
I’ve checked some topics but didn’t find the solution yet.

When i call sitecake.php, the popup appear, but when i login with basic “admin” password, i get “error” and can’t login…(i didn’t change the credentials)

I also have this message on top of page:

Warning: is_writable(): open_basedir restriction in effect. File(/storage/configuration/php_session_path) is not within the allowed path(s): (/storage/content/:/opt/phpfarm/inst/php-5.6.30/pear/php/) in file [SITE]/sitecake/2.4.5/src/Sitecake/ServiceProviders/SessionServiceProvider.php on line (#97)

Is it a server problem or should do something in config files?
I’m a bit lost because everything worked fine on my other server (same provider)

Let me know if you need more informations (the site url and/or phpinfo)

Many thanks in advance!

Hi,

check out this post Open_basedir restriction in effect
How are sessions handled on your server? By default sitecake assume that session.save_handler is ‘files’ so it check if save_path is writable and if not creates local dir to save session files to. If you have memcahe or maybe redis on your server you should adjust config vars in /sitecake/2.4.5/config/config.php file accordingly.
Also you could update open_basedir setting in your PHP configuration

Hi, thanks for the quick answer.

Sadly i failed :slight_smile:

I think session handler as “files” is correct. So:

  • I’ve created a folder for session storage
  • changed into config.php

$app[‘session.options’] = [
‘save_path’ => “/path/to/session-folder/”
];

Now when i log in, i have this message:

RuntimeException: Session Storage was not able to create directory “/path/to/session-folder/” in file [SITE]/sitecake/2.4.5/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php on line (#52)

I’ll check open_basedir settings later (even if i don’t really know how and where to look for that … )

Thanks

You set path correctly, just make sure that path you provided is writable by php user.

If you want to change open_basedir setting you can do it in php.ini file.

You can make sure if session handler is ‘files’ via phpinfo().

Hi again!
Thanks for your answers but i’ve tried many things but still not lucky.

  1. I’ve checked phpinfo and yes, the session handler is “files”.

  2. I’ve changed the path as described before and make it writable (777) in the tfp client (filezilla)

  3. I wanted to change the php.ini but there is no php.ini in the site folders or i’ve no acces to it,
    Should i create one by myself? If yes how?

Is the “folder’s tree” in the ftp client important?
Here is mine:

  • /
    • websitename.com
      * data
      * logs
      * public_html
      * cgi-local
      * index.php
      * sitecake.php
      * sitecake
      * session-folder (777)
      * …etc

Thanks for your time.
Best regards.