Community Forums

imagecreatefromjpeg() error? Need Help?

Please post any issues you are having concerning installation or upgrade of OpenCart v1.x

imagecreatefromjpeg() error? Need Help?

Postby Bioblaze » Sat Mar 31, 2012 2:03 am

Fatal error: Call to undefined function imagecreatefromjpeg() in /usr/home/God/public_html/store/system/library/image.php on line 34

Ive been away from Opencart for the Last Few months, so Ive been unable to keep up to date on the system. I just decided today to start a free install, and when i was done installing this was the first problem I found.

It completely stops the from Main Page from loading, no idea why.

This also happens when I press the Edit button in the system Menu for Editing the system Settings.

Anyone got a Fix for this? I would very much be happy to hear it. of Course.
Last edited by Bioblaze on Sat Mar 31, 2012 5:11 pm, edited 1 time in total.
When men become mice then are mice just as good as men?
Bioblaze
 
Posts: 19
Joined: Sat Jan 01, 2011 6:10 pm
Location: Fresno, California

Re: imagecreatefromjpeg() error? Got Help?

Postby rph » Sat Mar 31, 2012 3:40 am

Make sure you have GD installed.
-Ryan
rph
 
Posts: 4125
Joined: Thu Jan 07, 2010 3:05 pm
Location: Lincoln, Nebraska

Re: imagecreatefromjpeg() error? Got Help?

Postby Bioblaze » Sat Mar 31, 2012 5:08 pm

It isnt just about having GD install the --all-gd Flag for configuring php doesnt include libjpeg as well as libpng You have to add the Actual Flags --with-jpeg-dir=/usr --with-jpeg-dir=/usr

Which doesnt include itself in the All GD flag when you normally run the configuration of Php

Alot of people who dont know this on OpenCart will end up having this problem. It isnt about GD installed, its wither or not you have the correct flags set in the configuration that will make ti work.
When men become mice then are mice just as good as men?
Bioblaze
 
Posts: 19
Joined: Sat Jan 01, 2011 6:10 pm
Location: Fresno, California

imagecreatefromjpeg() error? Need Help?

Postby Bioblaze » Sat Mar 31, 2012 5:10 pm

GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 8
PNG Support enabled
libPNG Version 1.4.5
WBMP Support enabled
XBM Support enabled

Once you run it with the correct flags, this is what you`ll get in your phpinfo.

As you notice, libJPEG and libPNG. Very important to have.

If anyone needs help on this topic ive spent 6 hours reading up and doing recompiles correctly. I can give someone a helping hand.
When men become mice then are mice just as good as men?
Bioblaze
 
Posts: 19
Joined: Sat Jan 01, 2011 6:10 pm
Location: Fresno, California

Re: imagecreatefromjpeg() error? Got Help?

Postby rph » Sun Apr 01, 2012 1:34 am

Bioblaze wrote:It isnt just about having GD install the --all-gd Flag for configuring php doesnt include libjpeg as well as libpng You have to add the Actual Flags --with-jpeg-dir=/usr --with-jpeg-dir=/usr

Which doesnt include itself in the All GD flag when you normally run the configuration of Php

Alot of people who dont know this on OpenCart will end up having this problem. It isnt about GD installed, its wither or not you have the correct flags set in the configuration that will make ti work.

Come on, a few hours ago you couldn't even figure out GD was the issue. ::)

Most people who use OpenCart won't be setting up their own hosting environments and those that do really should be expected to follow installation instructions.
-Ryan
rph
 
Posts: 4125
Joined: Thu Jan 07, 2010 3:05 pm
Location: Lincoln, Nebraska

Re: imagecreatefromjpeg() error? Need Help?

Postby anitawos » Sun Jun 24, 2012 4:41 am

I just upgraded PHP from 5.2 to 5.3 Then tried to upgrade opencart from 1.5.2.1 to 1.5.3.1

Now I have a useless site, and
Fatal error: Call to undefined function imagecreatefromjpeg() in /home/aorowing/public_html/system/library/image.php on line 34
User avatar
anitawos
 
Posts: 20
Joined: Fri Jan 28, 2011 5:33 am
Location: Massachusetts, USA

Re: imagecreatefromjpeg() error? Need Help?

Postby rph » Sun Jun 24, 2012 3:13 pm

It's the same issue. GD isn't installed or isn't installed correctly. Run phpinfo and check the GD settings.
-Ryan
rph
 
Posts: 4125
Joined: Thu Jan 07, 2010 3:05 pm
Location: Lincoln, Nebraska

Re: imagecreatefromjpeg() error? Need Help?

Postby hyp88 » Thu Sep 24, 2015 9:29 am

Hi,

I have the same problem. After I installed an configured opencart, I removed the install dir. When I hit home page now I get this error:

Notice: Error: Could not make a database link ( could not find driver). Error Code : 0
in /app/apache_2.4/httpd-2.4.16/htdocs/system/library/db/mpdo.php on line 11

I did the phpinfo.php test. This is my GD info:

GD Support enabled
GD Version bundled (2.1.0 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
libPNG Version 1.2.49
WBMP Support enabled
XBM Support enabled

Directive Local Value Master Value
gd.jpeg_ignore_warning 0 0

This is very strange, before configuration it says the prerequisites are met, but in fact it doesn't work.
I'm running on Debian 7 with php 5.4.45, apache 2.4.16, opencart 2.0.20
hyp88
 
Posts: 1
Joined: Thu Sep 24, 2015 9:23 am

Re: imagecreatefromjpeg() error? Need Help?

Postby shehan9 » Mon Oct 12, 2015 9:06 am

You must install GD with libJPEG and libPNG.
I Hope this will save someone's time http://www.tectut.com/2015/10/solved-call-to-undefined-function-imagecreatefromjpeg
shehan9
 
Posts: 1
Joined: Mon Oct 12, 2015 9:00 am


Return to Installation, Upgrade, & Config Support

Who is online

Users browsing this forum: Google [Bot] and 11 guests

Hosted by A2 Hosting