Jump to content

[SOLVED] Error with session.save_path not existing


9smiths

Recommended Posts

SOLVED

 

 

 

Hi, I'm getting an error which is preventing my google login from working, when I turn debug mode on I see an error on the top of the frontend of my website saying it can't find a file in the path name "home4/[WebHostFolder]/tmp"

My Prestashop version 8.1.6.

Warning: SessionHandler::read(): open(home4/[WebHostFolder]/tmp/sess_d2091dddf77066a74079023801def518, O_RDWR) failed: No such file or directory (2) in /home4/[WebHostFolder]/public_html/[PrestashopDirectory]/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php on line 59

Warning: session_start(): Failed to read session data: user (path: home4/[WebHostFolder]/tmp) in /home4/[WebHostFolder]/public_html/[PrestashopDirectory]/classes/controller/FrontController.php on line 777

 

I recently fixed an issue where my debug mode would not work by changing the session.save_path to "/tmp" as was recommended in this post on another thread:

And now that debug is working, I see this error.

I've tried everything I can think of to fix this and not sure what to do next, any help is appreciated!

 

 

Edited by 9smiths
Solved (see edit history)
Link to comment
Share on other sites

  • 9smiths changed the title to Error with session.save_path not existing

Alright I solved my problem, and it turned out the session error was indeed the cause of my google login button not working. And for the sake of whoever stumbles across this in the future my solution was to add an override in the "config/defines_custom.inc.php" that set the session path, here is the code I used for my path (which is "/tmp" in my host provider settings:)

$session_dir = __DIR__ . '/../var/sessions';
if (!is_dir($session_dir)) {
    mkdir($session_dir, 0755, true);
}
session_save_path($session_dir);

This also creates the path if it doesn't exist.

Link to comment
Share on other sites

  • 9smiths changed the title to [SOLVED] Error with session.save_path not existing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...