Save Session in DB in ISPC3?

Discussion in 'General' started by Mosquito, May 6, 2010.

  1. Mosquito

    Mosquito New Member

    I have an application that saves sessions into a database on a non-ISPC3 server. This is accomplished by putting the following 3 lines into an .htaccess file at the root of the application - this would put it into a database called 'c9controlpanel' and the table 'sessions':
    Code:
    php_value session.save_handler user
    php_value session.save_path "c9controlpanel"
    php_value session.name sessions
    
    If I do the same on ISPC3, it doesn't seem to be noticed. Instead I get the following error (with or without the above 3 lines).
    Code:
    [Thu May 06 00:08:47 2010] [error] PHP Warning:  session_start(): open(/var/lib/php/session/sess_pnfvsqvbpv7t4gq1u2ok12aus0, O_RDWR) failed: Permission denied (13) in /var/www/clients/client9/web8/web/control-panel/include/login.php on line 24, referer: http://control.team-vipers.com/
    [Thu May 06 00:08:47 2010] [error] PHP Warning:  Unknown: open(/var/lib/php/session/sess_pnfvsqvbpv7t4gq1u2ok12aus0, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://control.example.com/
    [Thu May 06 00:08:47 2010] [error] PHP Warning:  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, referer: http://control.example.com/
    
    This application sits on the server with the following settings:
    SuPHP
    JailKit

    Does anyone have any ideas on how to get these sessions into the database?
     
  2. Mark_NL

    Mark_NL New Member

    Does the database "c9controlpanel" and table "sessions" exist on the server?

    php_value session.save_handler user

    did you set that as well, because the error message is:
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. Mosquito

    Mosquito New Member

    Ah. Thanks Till. I'll give that a try and let you know. I figured it was something simple. :)
     

Share This Page