Jump to content

image dimensions, uploading not working


Recommended Posts

Hello ya'll. So ran into an interesting problem.

The current project i'm working on is for a photographer. They would like to upload large image files. Scratch that it's more like huge!

So it's not so much the image size I'm running into an issue with, but actually the image dimensions. 1900x2860 px image doesn't upload, mind you the file size is about 800k. the uploader just gets stuck.

Reducing the image dimension to 1800px, allwed it to get uploaded finally, but when rendering the image on the site I would get the following error:

Error Allowed memory size of 33554432 bytes exhausted (tried to allocate 2800 bytes) (line 144 of /Users/carlos/Sites/test/wire/core/ImageSizer.php)

Obviously getting around this was simple and reducing the image width to a more managable size of 1200px did the trick.

I'm not sure if this is a bug or I just hit some sort of limit. But figured I'd throw this out there to see if there is some sort of fix.


Link to comment
Share on other sites

Hi Carlos,

you probably just hit on the memory size limit in PHP. You could try editing the server's php.ini file (if you can) and increasing the limit. On debian based distros you'd need to edit /etc/php5/apache2/php.ini but on other platforms I don't know where the file is. If the file is not accessible to you, you might need to contact your web hosting provider.

  • Like 1
Link to comment
Share on other sites

You can also locate where your php.ini file is by viewing the output of phpinfo(); Place this in a test.php file on your server and view it in your browser:

<?php phpinfo();

Search for "php.ini" and it should tell you exactly where it is. Since you are going to be dealing with large images, you may want to set your memory limit to 256M and hopefully that would cover the uncompressed size of those images enough that they can be manipulated from PHP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...