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

Options in startSession() causing ErrorException - possible cause #11

Open
Musiksammler opened this issue Mar 28, 2020 · 0 comments
Open

Comments

@Musiksammler
Copy link

Bug Report

Summary

New issue connected to issue #3

Current behavior

The sessions_start() in function startSession() can cause an ErrorException under certain circumstances.

How to reproduce

Create an environment, where the options set in startSession are defined in a per-host configuration

Expected behavior

No ErrorException.

I started this in issue #3 but never found the cause for the descripted behaviour.

But I stumbled across this comment in the comments section on php.net for the command "ini_set":

"I have experienced on some systems that ini_set() will fail and return a false, when trying to set a setting that was set inside php.ini inside a per-host setting."

Okay, he is talking about ini_set() and not session_start(), but that's exactly the cause in my case. in my local development environment I don't have host-specific ini-settings. So that exception was never thrown there. But on my production server it's the case. There is a global php.ini but for the host (apache environment) are certain ini-settings defined. "use_cookies" is one of them and when I removed that from the host ini-settings the same error was thrown but this time for "use_only_cookies" (the next parameter in order in your session_start() call).

So I suspekt that this is the cause for the exceptions.

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