Yet another one of the upload max size

Discussion in 'Installation/Configuration' started by axxies, Jan 22, 2019.

  1. axxies

    axxies Member

    I have a new problem which I haven't had before. It's regarding the max upload size to phpMyAdmin under ISPcondig 3 V3.1.13

    I have set this is all the PHP versions I have installed (5.6, 7.0, 7.1, 7.2 and 7.3) for cgi, cli and fpm.
    upload_max_filesize = 128M

    (the other sizes set are:
    memory_limit = 128M
    post_max_size = 128M
    )

    When I run a file with the phpinfo() in it, I do indeed see that upload_max_filesize is set to 128M, yet in phpMyAdmin for uploading SQL files to import into the database, it's still 2 MB (Max: 2,048KiB). And it affects our webdesign ppl too when they need to do updates.

    This seem to be haunting me because no matter the server I am on, and have configured in php.ini , I get this error. I have restarted Apache2 of course.

    Any ideas?

    (and yes, I have searched the forums but no matter what I do, I don't get it to work, and it used to work on previous servers I have had.)
     
    Last edited: Jan 22, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My quess is you have not modified the right php.ini file. Try
    Code:
    locate php.ini
    to find them all.
     
    axxies likes this.
  3. axxies

    axxies Member

    Yes, I get your point. I have edited all of those (except Apache since we don't use that, but maybe phpMyAdmin do that?) that I found under /etc/php/<version.number>/<type>

    I am running Debian stretch. I didn't get locate to work, so I used my old command:

    # find / -depth -print | grep php\.ini

    which resulted in, which makes it quite hard to understand what is used...

    Code:
    /usr/lib/php/7.3/php.ini-production.cli
    /usr/lib/php/7.3/php.ini-development
    /usr/lib/php/7.3/php.ini-production
    /usr/lib/php/7.0/php.ini-production.cli
    /usr/lib/php/7.0/php.ini-development
    /usr/lib/php/7.0/php.ini-production
    /usr/lib/php/7.2/php.ini-production.cli
    /usr/lib/php/7.2/php.ini-development
    /usr/lib/php/7.2/php.ini-production
    /usr/lib/php/7.1/php.ini-production.cli
    /usr/lib/php/7.1/php.ini-development
    /usr/lib/php/7.1/php.ini-production
    /usr/lib/php/5.6/php.ini-production.cli
    /usr/lib/php/5.6/php.ini-development
    /usr/lib/php/5.6/php.ini-production
    /usr/local/src/php7.1-build/php-7.1.14/main/.libs/php_ini.o
    /usr/local/src/php7.1-build/php-7.1.14/main/php_ini.c
    /usr/local/src/php7.1-build/php-7.1.14/main/php_ini.o
    /usr/local/src/php7.1-build/php-7.1.14/main/php_ini.lo
    /usr/local/src/php7.1-build/php-7.1.14/main/php_ini.h
    /usr/local/src/php7.1-build/php-7.1.14/php.ini-development
    /usr/local/src/php7.1-build/php-7.1.14/php.ini-production
    /usr/local/src/php7.1-build/php-7.1.14/ext/dba/php_inifile.h
    /usr/local/src/php7.1-build/php-7.1.14/ext/standard/tests/php_ini_loaded_file.phpt
    /usr/local/src/php7.2-build/php-7.2.2/main/.libs/php_ini.o
    /usr/local/src/php7.2-build/php-7.2.2/main/php_ini.c
    /usr/local/src/php7.2-build/php-7.2.2/main/php_ini.o
    /usr/local/src/php7.2-build/php-7.2.2/main/php_ini.lo
    /usr/local/src/php7.2-build/php-7.2.2/main/php_ini.h
    /usr/local/src/php7.2-build/php-7.2.2/php.ini-development
    /usr/local/src/php7.2-build/php-7.2.2/php.ini-production
    /usr/local/src/php7.2-build/php-7.2.2/ext/dba/php_inifile.h
    /usr/local/src/php7.2-build/php-7.2.2/ext/standard/tests/php_ini_loaded_file.phpt
    /usr/local/ispconfig/server/temp/php.ini.md5sum
    /var/www/clients/client1/web9/web/application/vendor/stripe/stripe-php/init.php
    /var/www/conf/web14/php.ini
    /opt/_php-7.1/lib/php.ini
    /opt/_php-7.1/include/php/main/php_ini.h
    /etc/php/7.3/fpm/php.ini.ucf-dist
    /etc/php/7.3/fpm/php.ini
    /etc/php/7.3/cli/php.ini.ucf-dist
    /etc/php/7.3/cli/php.ini
    /etc/php/7.3/cgi/php.ini.ucf-dist
    /etc/php/7.3/cgi/php.ini
    /etc/php/7.0/fpm/php.ini
    /etc/php/7.0/cli/php.ini
    /etc/php/7.0/cgi/php.ini
    /etc/php/7.0/apache2/php.ini
    /etc/php/7.2/fpm/php.ini.ucf-dist
    /etc/php/7.2/fpm/php.ini
    /etc/php/7.2/cli/php.ini.ucf-dist
    /etc/php/7.2/cli/php.ini
    /etc/php/7.2/cgi/php.ini.ucf-dist
    /etc/php/7.2/cgi/php.ini
    /etc/php/7.2/apache2/php.ini
    /etc/php/7.1/fpm/php.ini.ucf-dist
    /etc/php/7.1/fpm/php.ini
    /etc/php/7.1/cli/php.ini.ucf-dist
    /etc/php/7.1/cli/php.ini
    /etc/php/7.1/cgi/php.ini.ucf-dist
    /etc/php/7.1/cgi/php.ini
    /etc/php/5.6/fpm/php.ini
    /etc/php/5.6/cli/php.ini
    /etc/php/5.6/cgi/php.ini
    
    ...so I edited those that were for apache2 and voila! It works, at least for phpMyAdmin.
    (and yes, I indeed have stopped editing the apache2 php.ini files recently :) )

    The limitation for our webdesigner is still the same though. Hmmm...

    Thank you so far!

    (the number of existing php.ini files is massive and yet this is a standard "the perfect server for stretch" setup)
     
    Last edited: Jan 22, 2019
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    When working with a website, the settings for that php version and mode are used, unless overridden for that specific website. If you run phpinfo() under the website in question, it should tell you the settings in use as well as what php.ini file is being read. You can check a website's settings under Sites > {website} > Options > Custom php settings (check as admin, not logged in as a client).

    Also some php settings can be overridden by the specific website in .user.ini files, check for those with
    Code:
    find /var/www -name .user.ini
    The files under /etc/php/{version}/{mode}/ likely what are being used (find /etc -name php.ini); the one under /opt is probably from you starting down a different path for adding additional php versions, and likely not in use (though you'd have to check your settings under System > Additional PHP Versions be sure of that).
     

Share This Page