• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question PHP 7 Upload file over 64MB ?

WSNHosting

Basic Pleskian
how to config PHP Upload file over 64MB ?

i try

ini_set('post_max_size', '256M');
ini_set('upload_max_filesize', '256M');

echo ini_get("upload_max_filesize");
echo "<br>";
echo ini_get("post_max_size");

echo phpinfo();

or

php_value max_input_time 0
php_value max_execution_time 0
php_value post_max_size 500M
php_value upload_max_filesize 500M

in .htaccess

or

upload_max_filesize = 500M
post_max_size = 500M

not work !!
 
The maximum upload size can be set on the PHP configuration page of the subscription in Plesk. This is normally not set by the subscription user, but must be set by the administrator. The size set in the data fields that are meant for it cannot be overwritten by user settings (e.g. ini_set or php_value or add-on variables).
 
What is the exact error that is displayed or logged when you try to upload a file larger 64 MB despite your higher settings? Could it be possible that this is not a PHP issue, but "request entity too large" (client body size is too large)?
 
mod_fcgid: stderr: PHP Warning: POST Content-Length of 93000303 bytes exceeds the limit of 67108864 bytes in Unknown on line 0,
 
This does not sound possible to me. When phpinfo() is displaying the correct value, it is not possible that the actual execution of a POST is using a different value, because PHP cannot know that different value. Are you sure that phpinfo() is displaying for example 500 MB, yet the post error shows that the limit is 64 MB?

Have you tried to restart the web server? It should do that automatically on changes, but maybe there is an issue with web server reloads?
 
Back
Top