Increase File Upload Limit

Permalink
Like the subject, how do I increase it from 64mb to unlimited?

Not for other users, just the admins.

Thanks guys.

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,

that setting is a PHP setting to be set at your server level. Concrete5 doesn't control that, it just lives by it like anything else running on your server and using PHP.

Also, you can't have it set to unlimited (and you probably wouldn't like the effect if it was possible :)

If you double it to 128Mo you'll probably be just fine. You can ask your host to help you with that or try to do it yourself through your cPanel.
littleraingames replied on at Permalink Best Answer Reply
Ahh ok thank you, ya I was trying to google it and a stack overflow post popped up of editing a PHP file but since the warning came up from concrete I didn't think it had to do with that.

Edit: Ok so it was super easy. And only needed the CPanel to change my PHP type, then an FTP client to get the PHP.ini file.

As long as you are using a PHP version that has a single PHP.ini file in your public/html folder all you have to do is edit that file and change "upload_max_filesize" to your desired limit. I found this in the help section of my host, they did not mention though you also need to edit "post_max_size," concrete said it was post_max_filesize but that was non existent, my guess is different version of PHP. Apparently upload_max_filesize is the maximum size of one file being uploaded, and post_max_size is the maximum for a whole upload of many files as well as a single file.

To change your PHP version, if you have a Cpanel go to your PHP Config and select the version that says it will only have 1 PHP.ini file. There should be 3 to choose from with each numbered version.
So PHP5.4 will have default, single and FastCGI, PHP7.0 will have the default, single and FastCGI. As you guessed, choose the single. Test your site to see that everything is working, cause if not just switch it back.
If you are using the other versions I'm not sure exactly but my guess would be that each SubDirectory would have its own PHP.ini file. Don't take my word on that though, I'm not a web developer.

Edit2: I just noticed that I was not able to edit pages when I changed to PHP7.0 single, but I swapped it to 5.6 Single and its all good, I was using 5.4 default before.

This is all I had to do, but you should probably do a little reading on your hosts help section.
jasteele12 replied on at Permalink Reply
jasteele12
Don't know why you marked your own reply as best answer, since it is completely dependent on the hosting and Apache setup. It would help if you added your hosting provider details.

It can sometimes be a per-directory php.ini, php.rc, account-wide .php/php7/.phprc and in many cases only editable from a control panel. On some hosts the Apache server needs to be restarted (in the case of mod_php) or php processes killed (or waiting to die) in the case of FastCGI. There are many variations (including different servers other than Apache).

upload_max_filesize applies to individual file uploads and post_max_size applies to an entire POST (say multiple files + any other form inputs). If you set the upload size larger than the post size it won't work. In many cases there are hard-coded limits forced by the host, and trying to set it higher will not change anything.