upload_max_filesize = 2M

Permalink 1 user found helpful
I receive an error message "...upload_max_filesize = 2M..." when trying to upload a 3.5MB file to an old website running on concrete5 5.6.3.5. Where do I change this parameter so I can upload files greater than 2MB?

Thanks.

Alan

alanhalley
 
Gondwana replied on at Permalink Reply
Gondwana
My guess is php.ini, although you may be able to do it via CPanel or equivalent.
yfsneals replied on at Permalink Reply
yfsneals
Here's what I did (using CPanel):
Created a file called php.ini in the root folder.
All it contains is this:
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M


et viola.
You might bump up against limits set by your internet provider.
(I got this from the forums myself -- this isn't original)
ConcreteOwl replied on at Permalink Reply 3 Attachments
ConcreteOwl
If you have access to cPanel, why not make the changes using the provided functions..
Log in to cPanel, click on the 'Software' section and click 'Select PHP Version' (see image cpanel1.jpg),
Next click on 'Switch To PHP Options' (circled in the php-selector.jpg image),
Then find the item you want to change and click the value to change it.
Non-Default options will turn green, you will see from the final image (modify.jpg) that I made changes to 'max_input_vars', 'memory_limit', 'post_max_size' and 'upload_max_filesize'.
Don't forget to click the 'Save' button when you have finished..
alanhalley replied on at Permalink Reply
alanhalley
I don't see "Switch To PHP Options" in my Bluehost cPanel. I checked php.ini in public_html and upload_max_filesize = 50M and post_max_size = 50M. I still get "Uploaded file is too large. The current value of upload_max_filesize is 2M" when I try to upload a 3.5MB file. Interestingly, I notice several 5MB files in my C5 File Manager.
yfsneals replied on at Permalink Reply
yfsneals
Here's where I check with my provider. What is their policy? I know my host is leery of gargantuan files. They give me unlimited storage and bandwidth, but don't want me to run a movie download service. Otherwise they are very accomodating. Do they supply the PHP?



I Make 'em earn their $1.99/month. (well, made. I'm up to about $10 now that I've added features and the introductory rate has run out)
alanhalley replied on at Permalink Reply
alanhalley
Bluehost says it's a C5 issue...
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
They could be correct..
Do you have anything in your config/site.php file or in your htaccess file that is controlling the upload_max_filesize?
Justin1978 replied on at Permalink Reply
Justin1978
Aside from the PHP.ini you can also define a custom max upload size in the vhost file or the htacces file.
Gondwana replied on at Permalink Reply
Gondwana
...and there can be multiple php.ini files. I think the one that's used depends on how php has been invoked. If you can get the output from phpinfo() from a page on your site, that will tell you where it's loading php.ini from (I think).
pixelhero replied on at Permalink Reply
pixelhero
Create a simple something.php file in your root directory with the following contents:

<?php
phpinfo();
?>


Visit it in your browser and see what the max file upload says in there. If it says 2M then your custom php.ini is not doing anything (your host may not allow them for their own safety). You can try creating a/renaming that file as '.user.ini' instead.

If the php info still says 2M, and you have no access to cPanel to edit the PHP settings, then your host simply won't let you change that setting.

You can always try to do ini_set in your index.php in the such as:

init_set('upload_max_filesize','50M')
alanhalley replied on at Permalink Reply 1 Attachment
alanhalley
I found a solution. I changed to "Single php.ini" on the Bluehost PHP Configuration page (screenshot attached).

Thanks to all.

Alan