Larger Picture Files will not upload

3 posts by 3 authors in: Forums > CMS Builder
Last Post: October 25, 2012   (RSS)

By jeffrenner - October 24, 2012 - edited: October 24, 2012

I am having a problem with larger picture files not uploading properly on a couple of my websites that I recently completed using CMS Builder. When I upload files larger than 2mb I get the following error message on from the uploader: "Error uploading '1.jpg', server returned: HTTP 500"
The file is being uploaded to the "uploads" folder but no thumbnails are being produced and the picture is not showing up on the CMS interface. I have the file size set to unlimited in the interface. Any suggestions as to what the problem might be?

Re: [jeffrenner] Larger Picture Files will not upload

Hi jeffrenner,

Chances are that the php.ini file that your server uses to set PHP parameters has a limit on the maximum size upload that is allowed.

Upload the attached phpinfo file to your server, launch the file in your browser, and and in the results, search for file_uploads (should be set to ON), upload_max_filesize and post_max_size and see what values are there.

Many hosts allow you to change values in your php.ini file yourself if you ask them, or will change values for you.

You can safely change each of these values to 60M (60 megabytes) and hopefully that will solve your upload issues.

There's more on this topic in the SOLVING PHP FILE UPLOAD SIZE ISSUES recipe in my CMSB Cookbook www.thecmsbcookbook.com.

Hope that helps.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

phpinfo.php 1K

Re: [jeffrenner] Larger Picture Files will not upload

Hi,

Jerrys suggestion is great, I would add that most hosting services do allow you to create or edit your own php.ini files, and that CMS Builder comes with a php.ini file in its base directory that you can edit. If you go to the root directory of your CMS Admin folder you should see a file called php.ini. If you add the following lines to the bottom of it, your upload limit should be increased:

file_uploads = On
upload_max_filesize = 10M //needs to be in {x}M format


If you still can't upload files larger than 2mb then I would contact your hosting company and ask them about changing the limit.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com