Problem with session and suPHP

Discussion in 'Installation/Configuration' started by chua_jose, Mar 14, 2008.

  1. chua_jose

    chua_jose New Member

    i have install suPHP, and when i try start-session on script PHP, i recived this error:
    Warning: session_start() [function.session-start]: open(/var/lib/php/session/sess_7ue3a95psdsscri4o0e7aeopt7, O_RDWR) failed: Permission denied (13)

    If i do
    chmod 777 /var/lib/php/session
    all work ok.

    But can you tell me why the website do not use there own phptmp ?

    I checked PHP Safe mode in options of domain.

    in my i have
    session.save_path = /var/lib/php/session

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The safe mode options in ISPConfig will not work when you use suphp. If you want to use dedicated a session directory for every website, you will have to create a custom php.ini file for every site and set the session.save_path there to the correct directory.
  3. FractalizeR

    FractalizeR New Member

    Is there a way to automate this task of creating a copy of php.ini for each created site when suphp is used? suphp does not support php_value and php_admin_value in .htaccess or httpd.conf
  4. dpicella

    dpicella New Member

    The way I get around this is to keep the permission on /var/lib/php/session as 770 (the default)

    Then, add the suphp user to the apache group like so:

    # usermod -a -G apache web1

    But ... you will have to do this every time ispconfig 3 changes your website.

    If your website settings are set in stone, then it should be no big deal.

Share This Page