• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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