Unable to upload a file larger than 5mb via a php page. Checked php.ini file. Error message "exceeds MAX_FILE_SIZE directive in html"

August 9, 2016 2.4k views
CentOS PHP Applications

Centos, Apache, PHP Version 5.4.16
php.ini is:


There are no .htaccess files used that I know of.

edited by kamaln7
  • Hi! Can you post the path of the php.ini file that you modified? If you create a php file with just the following:


    Do you see the above configuration directives set to the correct values?

  • Yes, see answer below. Thanks.

3 Answers

Hi @kencushman,

Are you using FCGI by any chance? And is it a custom built application, or something like OwnCloud?

Thanks for the response. It is a custom built application, not OwnCloud or similar.
Do not believe I’m using FCGI, have standard Digital Ocean’s standard CentOS setup, modified php.ini (and restarted apache) per above specs.

Yes, i setup a phpinfo.php and the values displayed match exactly what’s in php.ini.
BTW, the php.ini is at /etc/php.ini.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!