php ini max upload size

Discussion in 'ISPConfig 3 Priority Support' started by Tom John, Dec 13, 2019.

  1. Tom John

    Tom John Active Member HowtoForge Supporter

    Hi guys,
    i use ispconfig 3 with apache 2 and fpm
    while installing wordpress i want to upload a new theme which is 9.4 MB. I get an error the link you follow has expired, which means the upload max size is not correct right?
    When i look into workpress media i see 8 MB is max upload size, but in /etc/php/7.2/fpm/php.ini i set
    Code:
    upload_max_filesize = 12M
    
    
    why the wordpress it is shown with 8 MB only but i set it up serverwide to 12 M?
    thanks a lot for helping me with this matter.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you restart php7.2-fpm afterward? Btw, you can also set the max upload size for a specific website by using the custom php.ini field of the website (options tab).
     
  3. Tom John

    Tom John Active Member HowtoForge Supporter

    Hi,
    thanks for your answer.
    Yes i restarted, but however before it was already 12 M in this php.ini
    i added as well custom php.ini and put it into /web directory.
    Code:
    root@server4:~# cat /var/www/casting-canarias.com/web/php.ini 
    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300
    root@server4:~# 
    
    
    this should work as well from my point of view, but i dont know why wordpress shows only 8 M
    Wordpress shows if i want to add new media :
    maximum upload file size 8 MB
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Use the custom php.ini field instead of that php.ini which you put into the web directory. and by using a file with the phpinfo() function inside, you can see which php.ini is used by the php process of that website.
     
  5. Tom John

    Tom John Active Member HowtoForge Supporter

    thanks for your kind answer at weekend. Great i can find out which php.ini is used.
    http://casting-canarias.com/php-info.php
    this is the phpinfo and from my point of view i should be able to upload a new theme of 9.6 M because 12 M is allowed, but however i get the same error.
    Do you have any idea?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I have this in the Website options tab for Custom php.ini settings:
    Code:
    post_max_size = 80M
    upload_max_filesize = 80M
    That does work.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to do what @Taleman suggested, it should not hurt to make the limits higher. I use limits of 80MB on my systems as well. And please don't forget to remove the phpinfo file as its always a security risk to expose that system info.
     

Share This Page