Opencart

OpenCart Warning: session_start() Error

If you are getting OpenCart Warning: session_start() error on your site, you can fix the problem by following the steps below.

Example Errors:

  • Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent
  • Warning: session_start(): Cannot send session cache limiter
  • 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
  • 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
  • Warning: session_start () [function.session-start]: open (/ usr/local/psa/home/vhosts/oguzturk.net/httpdocs/tmp/sess_71aqir6c0n9h8mr86fspgteib2, O_RDWR) failed: No such file or directory (2) in / usr / local / psa / home / vhosts / oguzturk / httpdocs / system / library / session.php on line 11

Reason for Error:

Since OpenCart session lifetime is very long and OpenCart does not terminate sessions automatically, sessions fill up and cause a warning session_start() error.

“Opencart Warning: session_start()” Error 1. Solution

  • Connect to your server via FTP.
  • Open the php.ini files in the main directory and in the /admin folder and make the following edits.
  • Find the session.gc_maxlifetime line.
  • Set the session.gc_maxlifetime value to 3600.
  • After the adjustment, it should be session.gc_maxlifetime = 3600; (3600 is 1 hour.)
  • You can set the session.gc_maxlifetime value in the /admin folder to 10800.
  • After the adjustment, it should be session.gc_maxlifetime = 10800; (10800 is 3 hours.)
  • Your problem will be fixed after the edit.

“Opencart Warning: session_start()” Error 2. Solution

If the above steps do not fix the problem, your output_buffering value is off. You can turn output_buffering on by following the steps below.

  • Log in to your WHM panel. (If you do not have WHM panel access, contact your server.)
  • Go to the Php Configuration Editor section under Service Configuration.
  • Set the output_buffering value to on.
  • Your problem will be solved.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top