changing php engine from apache to php-fpm fail to write session files

Discussion in 'General' started by Manuelb, Feb 23, 2017.

  1. Manuelb

    Manuelb New Member

    First thanks for the ISPConfig project, its awesome!

    I have a new install of ISPConfig 3.1 on Ubuntu Xenial 16.04 working nicely, I start a web site for testing, working with default php engine (apache2 module for php7). I noticed it a few days after I created it and changed the php engine to php-fpm.

    I went to /etc/php/7.0/php.ini and changed var to leave as /etc/php/7.0/php.ini.
    When trying to create sessions on php, It returns me an error trying to write on the site tmp dir, where I have other tmp files owned by apache from previous config and runs, but php-fpm cant write to dir.

    tmp dir is set like this (ls -all |grep tmp):
    drwxrwx--- 2 web1 client1 4096 feb 23 10:04 tmp

    and "members client1" return:
    web1 www-data

    So appears It should be able to write its own session files there but its not able to do it.
    Any idea?

    Best regards
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    First of all, mod_php should not be used anymore, we just support it for legacy reasons. Instead of mod_php, use php-fpm and the suexec checkbox has to be on. All files and folders in the "web§ folder of the site have to be owned by the web user and client group of this website. In case that there were any sessions in the tmp folder of the site that were created with mod_php, then delete them as they are inaccessible. Afterwards sessions with php-fpm will be working.

Share This Page