Problem uploading images with Joomla Estate Agency (Joomla component)

Hi,

I've installed Joomla Estate Agency (JEA) version 2.30 on my joomla version  2.5.4 website. When I attempt to upload 2 images to site via JEA list property I get the following error

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 18432 bytes) in <joomla installation folder>/libraries/joomla/image/image.php on line 392

Line 392 of image.php :
// Attempt to create the image handle.
                        $handle = imagecreatefromjpeg($path);
                        if (!is_resource($handle))
                        {
                              // @codeCoverageIgnoreStart
                              throw new RuntimeException('Unable to process JPG image.');
                              // @codeCoverageIgnoreEnd
                        }
                        $this->handle = $handle;
                        break;


I have the following settings in the loaded php.ini file
memory_limit = 128M
post_max_size = 10M
upload_max_filesize = 10M

How can I fix this problem?
mavcomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter HartCommented:
the images you are uploading are too big.
you need to resize them before you upload

if you haven't got a graphics program that can resize for web...
google image resizer  and install and use to resize you image to around 1200 x 800 pixels


then upload these web friendly photos  (they should not be bigger than 1200 px wide)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mavcomAuthor Commented:
Hi

Thanks. Is there a script I can use to check the file size before attempting to upload?

What is a good real estate component for joomla that allows users to add their properties?
0
Peter HartCommented:
in wondows just right click on the image file and click on properties
or hover over the file name (windows) and it will tell you the size
or simply use the file manager to list the images the folder listing can e configured to show the size.

its not free but this si good:
http://extensions.joomla.org/extensions/vertical-markets/real-estate/1790
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Ray PaseurCommented:
You might focus on this:

memory_limit = 128M

Try making that MUCH larger (Start with 512M).  I think the other upload and post-related limits are OK if the files are getting uploaded and the failure is happening after the upload, as the script attempts to create an image resource.

PHP has some bizarre internal data structures.  For example, a text file that is read into memory may occupy a value equal to its file size.  But convert the text file to an array by using explode() and it balloons up to 20X file size.  There may be something similar going on with imageCreateFromJPEG().

You may also want to inspect the program logic surrounding the use of the variables that are created with the imageCreate() functions.  There is a corresponding imageDestroy() function that needs to be called to release the memory.  In the code sample shown above, I would try it like this.

// Attempt to create the image handle.
                        $handle = imagecreatefromjpeg($path);
                        if (!is_resource($handle))
                        {
                              // @codeCoverageIgnoreStart
                              throw new RuntimeException('Unable to process JPG image.');
                              // @codeCoverageIgnoreEnd
                        }
                        $this->handle = $handle;
                        imageDestroy($handle); // RELEASE THE UNUSED LOCAL VARIABLE
                        break;

Open in new window

0
mavcomAuthor Commented:
Hi,

Adding imageDestroy($handle); // RELEASE THE UNUSED LOCAL VARIABLE didn't help.
0
Ray PaseurCommented:
Try running this script again using a very, very small image.  If that works, raise the memory limit to 512M and have a go with the larger image.

If you want to post a URL link to the image that's causing the failure I will be glad to experiment with it and see if I can load the image resource.
0
mavcomAuthor Commented:
Hi

Thanks for the assistance, but it appears that there might be something wrong with the images, because i've uploaded larger image files without getting the error.
0
Ray PaseurCommented:
memory size of 134217728 bytes exhausted
That's pretty unambiguous.  Please post the URL of some of the images that are causing problems.  I will try uploading them to my server so we can see if the image files are the problem.
0
mavcomAuthor Commented:
problem was solved but thanks for your assistance.
0
Ray PaseurCommented:
I don't know why you gave us the worst possible grade anyone can give at EE. We tried ot hep you and you did not follow our suggestions or respond to our requests for information.  Please see the grading guidelines here.
http://support.experts-exchange.com/customer/portal/articles/481419

I will ask a moderator to reopen the question so you can show us your solution and accept your own answer.
0
Peter HartCommented:
I think what  Ray_Paseur is trying to say is you have accepted comments as solutions which  would not help any visiting customer with the same problem, i.e. you have given  Ray_Paseur 100 points for asking to see one of the images. not really helpful to others.
0
Ray PaseurCommented:
If the author can post an answer that explains why our suggestions were not helpful (and shows how the issue was resolved) I would recommend B for that answer.  Otherwise recommend A.
0
mavcomAuthor Commented:
I've requested that this question be deleted for the following reason:

No solution was found.
0
Ray PaseurCommented:
10-4.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Joomla

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.