Mod_php not working

Discussion in 'Installation/Configuration' started by francoisPE, Feb 5, 2021.

  1. francoisPE

    francoisPE Member HowtoForge Supporter

    Hello,
    I run a ispconfig server on ubuntu 20.04 (perfect server set up)
    I run nextcloud on a website with php-fpm. It worked well.
    Nextcloud is asking me to turn "output_buffering = off" in php.ini.
    I don't want to turn it off for all website on my server. So that, I though about turning nextcloud on mod_php and changing in /var/www/conf/webx/php.ini, output_buffering = off
    But, when I move to mod_php in ispconfig, nextcloud address give 503 error. (whatever output_buffering is)
    I see a post (year 2012) proposing to look at suphp in /etc/apache2/conf.d, but this dir does'nt exist anymore... I try enable suExec with no change (still 503)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    mod_php should not be used anymore today, that#s why it's disabled by default on all new systems and mod_php does not support custom php settings per web anyway and is also not compatible with suexec. But php-fpm supports it. So to fix your issue, set php mode to php-fpm again and put the custom php setting that you want to use into the custom php.ini field on the options tab of the website.
     
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I'd even go further and uninstall all mod_php versions, and only use php-fpm; that is actually a requirement for using http/2.

    Regarding nextcloud, there have been some recent (last year or so) posts that I believe explain how to set it up, search the forums here and it'll probably save you a lot of time.
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  5. francoisPE

    francoisPE Member HowtoForge Supporter

    IspConfig is really awesome !

    Does this mean I can do : 'apt remove libapache2-mod-php'

    Thanks a lot !
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I think the package names have the version in them, so it'd be more like 'apt purge libapache2-mod-php7.4', and then be sure to 'a2enconf php7.4-fpm' (I think 7.4 is the default version for Ubuntu 20?)
     
  7. francoisPE

    francoisPE Member HowtoForge Supporter

    a2enconf php7.4-fpm is ok
    I installed libapache2-mod-php7.4 and libapache2-mod-php. I will purge both !
    Many thanks :)
     

Share This Page