Web GUI PHP settings not working after upgrade Apache

Discussion in 'ISPConfig 3 Priority Support' started by crazyivan, Mar 6, 2016.

  1. crazyivan

    crazyivan New Member HowtoForge Supporter

    Crew,

    We have been running ISPconfig3 for a few years with great satisfaction. A few weeks back we upgraded the Debian Jessie webserver. Currently running Debian GNU/Linux 8.3 (jessie), ISPConfig 3.0.5.4p8. and Server version: Apache/2.4.10 (Debian).
    The situation:

    We had a more or less failed Apache 2.2 > 2.4 upgrade. We had to make a lot of manual changes. The syntax change:

    2.2 configuration:
    Code:
    Order deny,allow
    Deny from all
    to
    2.4 configuration:
    Code:
    Require all denied
    ...caused us a lot of work. We managed and all sites are up and running.

    The Problem:

    When I create a new website using the Web GUI for a new Wordpress site, I encounter no issues until I want to change the post_max_size=128M and upload_max_filesize=128M using the GUI.

    I tried using MOD_PHP and adding an Apache snippet:
    Code:
    php_value post_max_size 128M
    php_value upload_max_filesize 128M
    I tried adding a PHP snippet for Fast-CGI, CGI, or SuPHP:
    Code:
    post_max_size 128M
    upload_max_filesize 128M
    The site does not reflect the changes.
    In /var/www/conf/web###/php.ini

    I read:
    PHP:
    End:
    post_max_size128M
    upload_max_filesize
    =128M
    The directives are added AFTER ;End:, is this correct?

    In /etc/apache2/sites-available/sitename.vhost I cannot find any trace of my set php_value.

    I even DISABLED PHP for this particular website. But the site was still running just fine. So the PHP control from the web GUI is broken in my setup.

    Question:

    Can someone set me on the right track to debug this the right way? Currently I'm lost.
     
    Last edited: Mar 6, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no manual changes required when you update from apache 2.2 to 2.4. All you have to do is:

    1) Upgrade Debian 6 to 7.
    2) Run an ispconfig update and choose "reconfigure services" = yes.
    3) Login to ispconfig, go to tools > Resync, select websites and click on resync.

    The complete config gets updated for apache 2.4 automatically. Manual edits can break the system so that it can not write changes to vhosts anymore, so better don't do that.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that correct. Directives have to be added at the end as they override values that are set in the file earlier.
     
  4. crazyivan

    crazyivan New Member HowtoForge Supporter

    Til, thank you for your promt reply. But the damage is already done. (Currently running Debian GNU/Linux 8.3 (jessie), ISPConfig 3.0.5.4p8. and Server version: Apache/2.4.10 (Debian).) I'm pretty sure I followed the suggested steps. My thread title might be misleading. I'll change it. Could you please read through my post again?
     
    Last edited: Mar 6, 2016
  5. crazyivan

    crazyivan New Member HowtoForge Supporter

    I can't seem to change the title of my post?

    Found it. :-D
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Get the vhost files saved with .err ending after you do a change?
     
  7. crazyivan

    crazyivan New Member HowtoForge Supporter

    Yes, they do. Not sure why I missed that.
     
  8. crazyivan

    crazyivan New Member HowtoForge Supporter

    Those .err vhost files do contain the Apache directive snippets content. I ran the /usr/local/ispconfig/server/server.sh but I don't see any related error.
    (Only ERROR - CA path error, file does not exist:admin/openssl.cnf)
    /usr/local/ispconfig/server/lib/config.inc.php:
    $conf['log_priority'] = 0; // 0 = Debug, 1 = Warning, 2 = Error
     
  9. crazyivan

    crazyivan New Member HowtoForge Supporter

    . /etc/apache2/envvars && apache2 -t
    Syntax OK
     
  10. crazyivan

    crazyivan New Member HowtoForge Supporter

    I think SuEXEC is not doing it's job either.
     
  11. crazyivan

    crazyivan New Member HowtoForge Supporter

    Current mod_suphp config:
    Code:
    <IfModule mod_suphp.c>
      # <FilesMatch "\.ph(p3?|tml)$">
      #  SetHandler application/x-httpd-suphp
      # </FilesMatch>
      suPHP_AddHandler application/x-httpd-suphp
    
      <Directory />
      suPHP_Engine on
      </Directory>
    
      # By default, disable suPHP for debian packaged web applications as files
      # are owned by root and cannot be executed by suPHP because of min_uid.
      <Directory /usr/share>
      suPHP_Engine off
      </Directory>
    
    # # Use a specific php config file (a dir which contains a php.ini file)
    #  suPHP_ConfigPath /etc/php5/cgi/suphp/
    # # Tells mod_suphp NOT to handle requests with the type <mime-type>.
    #  suPHP_RemoveHandler <mime-type>
    </IfModule>
    
     
  12. crazyivan

    crazyivan New Member HowtoForge Supporter

    I suspect that ISPConfig is currently not able to control the correct use and type of PHP (enginge). What part of the (server)config is worth looking at to fix this issue?
     
  13. crazyivan

    crazyivan New Member HowtoForge Supporter

    Crew,

    Currently mod_php does not work with a regular Wordpress setup. Using Fast-CGI and a php.ini snippet
    Code:
    post_max_size= 256M
    upload_max_filesize=256M
    
    I got it to work. I'm not sure what caused this issue. This pointed me in the right direction:


    For now I'll stick to the fact that there was a ####.vhost.err file present. Renaming this to .vhost and restarting Apache while tailing multiple logs (tail -f logname.log anotherlog.log) showed errors. A old config change caused the creation of an .err file. The GUI does not show this. All following changes won't be parsed.

    Feature suggestion: create an indicator icon next to the sitename in SITE > WEBSITE > tab DOMAIN that appears when an .err vhost-file is present.

    WebGUI suggestion: Improve the annotation in SITE > WEBSITE > tab OPTIONS. Clarify where directives for a particular PHP engine go.
     
  14. crazyivan

    crazyivan New Member HowtoForge Supporter

    How do I fix mod_php? Should even bother?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    When there is a vhost with .err ending, then ispconfig tried to use that file but apache did not start with it. To see the actaul error message, make, do this (for example.com):

    cd /etc/apache2/sites-available
    mv example.com.vhost example.com.vhost.bak
    mv example.com.vhost.err example.com.vhost

    then try to restart apache and check the error message.
     
  16. crazyivan

    crazyivan New Member HowtoForge Supporter

    Till, thank you for your suggestion. I would appreciate if you took the time to read through the thread. You could read I did exactly as you suggested. Using the same procedure I've indeed been able to fix the issue. My sites run fine using FAST-CGI.

    What I don't understand is why this won't work using mod_php. When I enable mod_php I should add a Apache snippet correct? Something like:
    Code:
    php_value post_max_size 128M
    php_value upload_max_filesize 128M
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    mod_php should not be used anymore for security reasons, the recommended modes are php-fcgi or php-fpm, mod_php support exists just for legacy reasons.

    Change from mod_php to php-fcgi or php-fpm, then you can do php settings (use the same format that is used in php.ini file) in the custom php.ini field of the website.
     
  18. crazyivan

    crazyivan New Member HowtoForge Supporter

    Thank you. I'll make sure I'll migrate all sites to php-fcgi. And I'll leave mod_php for what it is. Thanks again for the support. Your work and software is very much appreciated!
     

Share This Page