0

Im running CentOS.

Im not exactly sure the standard max upload limit in PHP,

but i tried to upload an 8MB file and i see a loading status on my browser, when it reached 100, it does nothing. the file was not successfully uploaded.

my php.ini

upload_max_filesize = 50M post_max_size = 50M 

when i try uploading using Filezilla, im not having any problems at all.

2
  • Check error logs and phpinfo(); Commented May 9, 2013 at 13:20
  • I had a similar issue where a size limit of 16Mb was displayed but the actual limit was 1Mb: after setting the size in the webserver's setting (nginx in this case) it worked as expected. Commented Nov 4, 2019 at 16:40

3 Answers 3

0

PHP is executed after POSTed data has been transmitted to the server. If you were to upload a 1GB file, then it would be up to your web server to stop the upload when it reaches your limit. This is why you see your web browser run and complete the upload before it fails.

After the data is uploaded, then the web server will execute PHP. The php.ini settings are used to see if the posted data exceeds the allowed limit. If it does, then PHP will reject it.

If the file is uploaded via a posted form, then the post_max_size is checked. It doesn't matter if the form submitted a file attachment, or just contains a large amount of data. PHP will check this parameter to see if the posted data is too large.

set_time_limit(0); will not resolve issues related to long upload times. Since the web server does not execute PHP until all the posted data is received. If there is a problem during the sending of the data to the server, then the issue may be in the web server.

Filezilla is a FTP/SFTP/FTPS client and has nothing to do with PHP.

3
1

What are you using for a webserver? - check the webserver config, usually there is a setting there for max filesize as well.

0

Have you tried with a smaller file?

It may be from your PHP script this problem and not from the server, or try to increase PHP execution time:

set_time_limit(0); 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.