Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
hello again ... I have defined a repeatable region with an image upload editable region and I am getting an error when trying to upload an image of 5.36MB. The images are intended as download images for printing off etc so need to be a decent size. The error is
The upload file exceeds the upload_max_filesize directive in php.ini

I have looked here http://www.couchcms.com/forum/viewtopic.php?f=4&t=1568&p=2354&hilit=upload+limit#p2354 and have made the following changes:

1. couch/includes/fileuploader/config.php change line 98 from 2 to 0
2. admin/includes/timthumb.php change line 49 from 50M to 100M

and here http://www.couchcms.com/forum/viewtopic.php?f=4&t=168&p=499&hilit=upload_max_filesize#p499 and made the following changes:

1. put the line "upload_max_filesize = 100M;" into a php.ini file at root level
2. put the line "upload_max_filesize = 100M;" into couch/addons/repeatable/php.ini

But I'm still getting the upload error. Any ideas? Thanks!
Hi,

As the error states, it is the upload_max_filesize directive in php.ini that needs to be changed.
You say that you have already done this.
The problem with php.ini is that many times the changes do not take effect without restarting the web-server.
Please try putting the following line in any of your template
Code: Select all
<?php phpinfo(); ?>

It should show you the current settings of your php.ini. Search for 'upload_max_filesize' and see if it shows the modified value.
If not, you'll require restarting the web-server.
GoDaddy allows restarting the services from their CPanel. Other providers will likely have other ways. Maybe you'll have to contact your hosting provider for help.
OK I've made some progress! I can see that the upload_max_filesize has taken effect and I have successfully uploaded the image. But when I click 'save' I get a blank screen. This happens when I am saving the uploaded image into a repeatable region (though I have placed a php.ini file with upload_max_filesize = 10M; - this seemed like a better limit - into couch/addons/repeatable/). I have tried saving with the uploaded image into a non-repeatable region and this works.

Is there something else I can try to get this to work in a repeatable region?
Could you please try changing the 'type' of the editable region used as repeatable from 'image' to 'file'? Since the image is meant only for downloading the change shouldn't matter.

Please let me know if using 'file' instead of 'image' avoids running into the memory issue.
Thanks.
aha - yes that works thank you (and I should tell you that when I said it worked uploading the image to a non-repeatable region - I realised that I had tried it on a region that was type of 'file' and it doesn't work on a non-repeatable type of 'image').

Thanks for your help!
5 posts Page 1 of 1
cron