problem with upload max size

Discussion in 'ISPConfig 3 Priority Support' started by fluiz, Apr 14, 2015.

  1. fluiz

    fluiz New Member HowtoForge Supporter

    I recently had a problem with the "upload max size"... the limit was 2mb, SuEXEC is on, and PHP is Fast-CGI
    well, firstly I tried to change the config in Sites>Web Domain>Options>Custom php.ini settings,
    i wrote:
    upload_max_filesize = 20M
    post_max_size = 20M
    and i restarted the apache (/etc/init.d/apache2 restart)
    but nothing happened...
    then i tried to change this values in .htaccess:
    php_value post_max_size 20M
    php_value upload_max_filesize 20M
    i don´t know why, but i restarted again the apache...
    and nothing happened again...
    then i edited the file /etc/php5/apache2/php.ini , restarted again...
    And WORKS!!!!

    My question is: how do I make work the settings in "Custom php.ini settings"????
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is that you use the wrong php mode. mod_php should not be used anymore as it is insecure because all sites run under the smae user and it does not support a custom php.ini file. Just leve php settings at their defaults when you create a nwe website (php.fcgi + suexec on) then the scripts of the site run securely under their own user, you are able to upload files with php into the site without the need to do any changemods and you can use custom php.ini settings.
     
  3. fluiz

    fluiz New Member HowtoForge Supporter

    but i don´t chose "mod-php", as I described above, I used Fast-CGI. and suexec ON. That is, I used the default settings...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    But you wrote that changing the file /etc/php5/apache2/php.ini had an effect, this file is used by mod_php only, it is not used by php-fcgi nor by php-fpm mode. So your website must be using mod_php at the moment.

    Add a phpinfo() file in the website and check which php handler is used.
     
  5. fluiz

    fluiz New Member HowtoForge Supporter

    Server API: CGI/FastCGI
    Loaded Configuration File /var/www/conf/webXX/php.ini
    Configuration File (php.ini) Path: /etc/php5/cgi

    And at the end of "/var/www/conf/webXX/php.ini" are the lines included the ispconfig...
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok so far. But then the /etc/php5/apache2/php.ini could not had any impact. Maybe you uploaded a file with phpmyadmin or webmail? phpmyadmin and webmail are not installed in a website, they are installed globally and use mod_php.
     
  7. fluiz

    fluiz New Member HowtoForge Supporter

    ... till.... thank you...
    perfectly correct ...
    I was only testing with webmail and did not even realize. I did other tests, and really, everything is working perfectly.

    thanks again for your great help.
     

Share This Page