1

server :
Plesk panel 10.3.1,
PHP 5,
Apache2

When I updated the plesk panel, I noticed a strange error while uploading files. My server does not allow any file to be uploaded above the 128kb, even when the settings in /etc/php5/apache2/php.ini are set to higher sizes.

my settings:

upload_max_filesize = 10M,
post_max_size = 8M,
memory_limit = 128M

The error is really not clear. In drupal this is returned: http error 0 (when uploading I receive a 500 internal server error)

Germaike
  • 61
  • 1
  • 7

5 Answers5

5

Solution:

FcgidMaxRequestLen -->This is causing the problem. Before updating to the newest version, it was default set to 1gb. Now it is 128kb. Add the following to the file /etc/apache2/conf.d/fcgid.conf :

FcgidMaxRequestLen 1073741824

This wil give you a limit of 1gb. Next, restart your apache.

Germaike
  • 61
  • 1
  • 7
0

In order to keep this post relevant for more modern versions of Plesk (Onyx/Obsidian at least), there are overrides found in /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php which require a recompile /usr/local/psa/admin/bin/httpdmng --reconfigure-domain <site.com>

You can also override FcgidMaxRequestLen on your /var/www/vhosts/<site.com>/conf/last_httpd.include and restart apache after a configtest for a quick fix.

one reference: https://stuffthatspins.com/2013/01/22/exceeds-maxrequestlen-16777216-plesk-mod_fcgid-unable-to-upload-large-files/

Brian Thomas
  • 398
  • 3
  • 15
0

On Plesk that's generally not the default path for php.ini. From the command prompt what do you get when you input:

# whereis php.ini

Mine is located at /etc/php.ini

The 500 error is a 'catch-all' error indicating most likely that something is mis-configured either on the webpage you're trying to access or on the webserver itself. If the error is only on that one page then chances are it's the culprit. Are the permissions set correctly to allow uploads (chmod 755 or 777)?

[Drupal] > See Technotes

enter image description here

l'L'l
  • 138
  • 6
  • when i upload a smaller file like 50kb, it just saves it on the server. When i type whereis then i receive this:/usr/bin/php /usr/lib/php /usr/share/php /usr/share/man/man1/php.1.gz – Germaike Sep 23 '11 at 14:04
  • Is there a php.ini in /usr/share/php? – l'L'l Sep 23 '11 at 14:15
  • no, i also did a sysinfo with php and found out he uses /etc/php5/cgi/php.ini but we have the same settings in this file. any other ideas? the other php.ini's are not filled or not in the dir. – Germaike Sep 23 '11 at 14:37
  • The error you described also could mean that your Drupal is not configured correctly. Check the settings on that and refer to the image above for reference. Also try what Janne has suggested ~ – l'L'l Sep 23 '11 at 15:02
  • These fields are empty and set to the default php setting by drupal. I will try out janne his anwser. Thx in advance for all the help. – Germaike Sep 23 '11 at 20:56
0

In addition to PHP the reason can also be Apache if it has MaxRequestBodySize set or modules like mod_security are in use.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
0

In CentOS6/PLESK, my fcgid.conf was located /etc/httpd/conf.d/fcgid.conf but solution above worked perfectly, after restarting Apache, of course.

RCNeil
  • 615
  • 3
  • 9
  • 17