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

CodeIgniter\Session\Handlers\FileHandler Class and writable\session Directory not found while using .env #994

Closed
abhishekKrHaith11 opened this issue Apr 21, 2018 · 1 comment

Comments

@abhishekKrHaith11
Copy link
Contributor

I'm using : Windows 10 ( 64-bit ) with XAMPP 7.2.3

Here is my session config in .env -

app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'
app.sessionCookieName = 'ci_session'
app.sessionSavePath = 'C:\xampp\htdocs\develop\CodeIgniter4\writable\session'
app.sessionMatchIP = false
app.sessionTimeToUpdate = 300
app.sessionRegenerateDestroy = false

Error for session driver: Class ''CodeIgniter\Session\Handlers\FileHandler'' not found

Error for session save path: mkdir(): No such file or directory

Debug

While debugging, I found when we are using backslash within single or double quotes in .env file apache sets the value with the single or double quotes in $_ENV.

So at BASEPATH/Config\Services.php at line 709 it tries to create a object with 'CodeIgniter\Session\Handlers\FileHandler' class which does not exists.

And in BASEPATH/Session\Handlers\FileHandler.php at line 112 it tries to create a directory in a path which does not exists.

@lonnieezell
Copy link
Member

Thanks for the debug and the fix. It's been merged.

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

2 participants