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
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
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.
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.
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'));
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.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'));
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.
@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? => ''
Let me know!
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: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.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'));
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.
This worked for me too.
Professional UK Based eCommerce - Our Free Opencart Mods - Our Premium Opencart Mods
Kashflow Integration
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
Please support other
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
Please support other
Who is online
Users browsing this forum: No registered users and 138 guests