Upload size limit with parallels plesk >12.0 : what conf?

2.2k views Asked by At

I have a big problem concerning the file upload limit (I need a large size, around 2Go) : I was using my app in /var/www/vhost/default and it was working perfectly, I decided to change it and use /var/www/vhost/mydomain.com to have it throught the plesk panel, and there I have an upload limit than I need to push. I can't upload files larger than 128Mo and I don't know why.

  • I have checked all php.ini files (with locate php.ini) and they are all correct.
  • I used plesk panel to set php conf -> done.
  • I put :

php_value memory_limit 2000M

php_value upload_max_filesize 2000M

php_value post_max_size 2000M

in my .htaccess in htdocs

  • I put a vhost.conf and a vhost_ssl.conf in /var/www/vhost/mydomain.com/conf with :

< Directory /var/www/vhosts/mydomain.com/htdocs/>

php_value upload_max_filesize 2000M

php_value post_max_size 2000M

php_value memory_limit 2000M

< / Directory>

  • I disabled nginx.
  • I edited /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php to put :

FcgidMaxRequestLen 2147483648

  • I tried :

grep attach_size_limit /etc/psa-webmail/horde/imp/conf.php

$conf['compose']['link_attach_size_limit'] = 0;

$conf['compose']['attach_size_limit'] = 0;

I reload/restart apache2, psa, ... And it still doesn't work, I have no more idea every conf file seems correct. It's not a permission problem because I can upload some 80Mo files but not 500Mo ...

Someone has an idea ?? I need to fix it fast

Thanx !!

2

There are 2 answers

0
Y. Kolasa On

So, to begin with, I'm now in charge of the problem explained above.

That said, it is solved.

I'll explain the steps there if someone ever encounters something similar, so this topic might help. Three problems here, in fact :

  • First, nginx overridden by plesk default templates. So you need to create (if it doesn't exist) a "custom" folder in "/usr/local/psa/admin/conf/templates", then copy and paste choosen files (here: /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php) in the custom folder (keep the hierarchy of the folders when copying the files). Modify your files as you want (client_max_body_size here), check that your files are valid php using "php -l nginxDomainVirtualHost.php", and generate new files using this command : "/usr/local/psa/admin/bin/httpdmng --reconfigure-all" (you might use another --reconfigure option). That's it. Source: link

  • Second: Copy and paste "/usr/local/psa/admin/conf/default/domain/domainVirtualHost.php" into the custom folder mentioned above, edit the line where FcgidMaxRequestLen is to your own value. Save and check that your php file is valid. Generate new configuration files. Source: link

  • Third: there is a php menu named "PHP settings" under "Website and domains" on Plesk, there you can override config files by applying custom value directly for memory_limit, post_max_size, and upload_max_filesize. Of course, php.ini files were changed accordingly prior to that (cf. OP's post).

That was the last thing that keeped us from uploading bigger files.

0
24x7servermanagement On

Can you please try to check your php upload limit by creating phpinfo file under account. If it's showing correct value and your application is not working then try to update your /etc/httpd/conf.d/fcgid.conf file.