Post by M.Fidan » Fri Oct 16, 2009 4:29 pm

1) Warning: session_start() [function.session-start]: open(/var/lib/php/session/sess_o3i1bsba2kbcaha17q8hmc55m7, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/site/httpdocs/system/library/session.php on line 11

2) Warning: Unknown: open(/var/lib/php/session/sess_o3i1bsba2kbcaha17q8hmc55m7, O_RDWR) failed: Permission denied (13) in Unknown on line 0Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

HELP ME :'(

Newbie

Posts

Joined
Fri Oct 16, 2009 4:28 pm

Post by Daniel » Sat Oct 17, 2009 12:14 am

your session tmp direct does not have the corrct permissions.

you need to configure your server properly for opencart to work.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Joe » Tue Oct 12, 2010 8:30 am

For anyone else having this problem, try deleting session data from your browser. Under some circumstances PHP may not be able to access and old session but it may still be able to create a new one. This might happen if you changed the way Apache launches PHP, for example.

Joe
Newbie

Posts

Joined
Tue Oct 12, 2010 8:26 am

Post by sudhir » Mon Nov 15, 2010 2:45 am

opencart uses "/var/lib/php/session" for storing session, one has to set permission for this folder.
Usually web server user (apache) will have write access to /var/lib/php/session folder, but opencart runs with user credentials of ftp which is used to upload file.
if one can change the session folder to <user-home>/tmp folder, or make sessions folder part of opencart and use this folder for storing sessions.

Request OC team to make necessary changes, as most shared host users will not have access to change permission for "/var/lib/php/session"

Adding below line to file system/library/session.php , created tmp folder document root folder, Resolved the problem.

Code: Select all

session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));

Newbie

Posts

Joined
Mon Nov 15, 2010 2:39 am

Post by Daniel » Thu Nov 18, 2010 4:13 am

opencart does not use /var/lib/php/session.

its what ever the session directory is set to in the php.ini or conf file that is used when php was installed.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by xtr3mx7 » Fri Feb 11, 2011 10:46 pm

I had same problem with the var/lib/tmp... but suggestion from Sudhir helps here :) Thanks a lot Sudhir.

New member

Posts

Joined
Mon Jul 13, 2009 1:02 am

Post by wcraft » Thu Jun 14, 2012 3:20 am

sudhir wrote:Adding below line to file system/library/session.php , created tmp folder document root folder, Resolved the problem.

Code: Select all

session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
This worked for me. Additionally, for anyone else stumling upon this issue and having to setup OpenCart in a multiple-server cluster environment for load-balancing and HA, this is a good mod to re-write sessions to an NFS, Ceph, GlusterFS, or similar sharepoint.

I also like having this set within the OpenCart environment because I have other apps on the same servers that don't need tmp folders shared between servers. So one-size fits all, such as the default PHP.ini config isn't applicable in all cases.

For the OC dev team, adding this as an optional configuration within the config.php would be a nice-to-have.

Thanks sudhir.

Newbie

Posts

Joined
Wed Aug 03, 2011 11:37 pm

Post by dlo80 » Sat Jul 14, 2012 10:11 pm

@wcraft,

I also have my OC running in a cluster environment for load balancing. Now i'm facing an issue during the checkout, cause most of the time when switching from http to https, the server also changes. And then it's not possible to complete the checkout. Is this also a solution for my situation? => '

Code: Select all

session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
'

Let me know! :)

wcraft wrote:
sudhir wrote:Adding below line to file system/library/session.php , created tmp folder document root folder, Resolved the problem.

Code: Select all

session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
This worked for me. Additionally, for anyone else stumling upon this issue and having to setup OpenCart in a multiple-server cluster environment for load-balancing and HA, this is a good mod to re-write sessions to an NFS, Ceph, GlusterFS, or similar sharepoint.

I also like having this set within the OpenCart environment because I have other apps on the same servers that don't need tmp folders shared between servers. So one-size fits all, such as the default PHP.ini config isn't applicable in all cases.

For the OC dev team, adding this as an optional configuration within the config.php would be a nice-to-have.

Thanks sudhir.

Newbie

Posts

Joined
Thu Mar 01, 2012 5:04 am

User avatar
New member

Posts

Joined
Tue Jul 05, 2011 3:53 pm


Post by haxcop » Tue Sep 06, 2016 6:01 am

First as it says @daniel is a permission error which can easily be solved
It happens to me on EC2

Login to your host over ssh and

sudo chown -R root:[YOUR_GROUP] /PATH/TO/php/5.6/session
sudo chmod 2775 /PATH/TO/php/5.6/session
find /PATH/TO/php/5.6/session -type d -exec sudo chmod 2775 {} \;


Wala!! Works O0

Please support other ;)

Save Time and the hassle of the legal stuff on your site with this Amazing Guys of
Iubenda http://bit.ly/2xKZBKh


New member

Posts

Joined
Tue Jan 14, 2014 9:38 pm
Location - Dublin
Who is online

Users browsing this forum: No registered users and 7 guests