Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support session.save_path in N;MODE;/path format #6116

Open
tenzap opened this issue Mar 16, 2022 · 0 comments
Open

support session.save_path in N;MODE;/path format #6116

tenzap opened this issue Mar 16, 2022 · 0 comments

Comments

@tenzap
Copy link
Contributor

tenzap commented Mar 16, 2022

While deploying a project based on CI3 on sourceforge.net web servers, I faced a problem with session save path.

sourceforge.net's web servers run PHP 7.1 and are configured with session.save_path set to 3;600;/home/web-sessions

In the config.php of the CI3 project we left the value to the default NULL so it takes the value of php.ini's session.save_path.

But with the config set to 3;600;/home/web-sessions PHP returns this error:

Fatal error: session_start(): Failed to initialize storage module: user (path: 3;600;/home/web-sessions) in ....

Note: This type of configuration is described here: https://www.php.net/manual/en/session.configuration.php#ini.session.save-path

Error is on this line:

And here we have a check if the session_save_path is a dir is_dir() which doesn't pass. Hence the error.
https://github.com/bcit-ci/CodeIgniter/blob/3.1.13/system/libraries/Session/drivers/Session_files_driver.php#L133

Could this type of configuration be supported in future? Or maybe also in CI4?

Workaround: create a custom folder and settthe path to it in config.php. However it would probably be better to use the built-in config on sourceforge which may be optimized and have some GC, which can't be done/configured in the project webspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant