Hello,
I receive this error on installation for the main site. The admin area seems to work but the store front only displays this:
Fatal error: Call to undefined function imagecreatefromjpeg() in /.../.../htdocs/en_US/opencart/include/image.php on line 59
Any help is greatly appreciated. Thank you.
I receive this error on installation for the main site. The admin area seems to work but the store front only displays this:
Fatal error: Call to undefined function imagecreatefromjpeg() in /.../.../htdocs/en_US/opencart/include/image.php on line 59
Any help is greatly appreciated. Thank you.
Hi Daniel,
Yes, I do have it installed. Here is the info from doing a: php phpinfo()
===============================================
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Yes, I do have it installed. Here is the info from doing a: php phpinfo()
===============================================
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Last edited by whoknows on Thu May 10, 2007 9:40 pm, edited 1 time in total.
imagecreatefromjpeg is a built in function or php.
More details here:
http://hk2.php.net/manual/en/function.i ... omjpeg.php
Is your PHP version 4 or greater?
More details here:
http://hk2.php.net/manual/en/function.i ... omjpeg.php
Is your PHP version 4 or greater?
Last edited by Daniel on Fri May 11, 2007 12:16 am, edited 1 time in total.
OpenCart®
Project Owner & Developer.
I have not actually come accorss this problem before.
What version of GD do you have?
The only information I could find was this:
What version of GD do you have?
The only information I could find was this:
Note: JPEG support is only available if PHP was compiled against GD-1.8 or later.
If imagecreatefromjpeg() fails with "PHP Fatal error: Call to undefined function: imagecreatefromjpeg()", it does NOT necessarily mean that you don't have GD installed.
If phpinfo() shows GD, but not JPEG support, then that's the problem. You would think that --with-gd would do the right thing since it does check for the existance of libjpeg (and finds it) and add that feature to GD, but it doesn't in v4.4.4 at least on RHEL v2.1, RHEL v3, CentOS v2.1 or CentOS v4.3.
On those platforms, it's *important* that --with-jpeg-dir be *before* --with-gd. If it's not, GD won't build with jpeg support as if --with-jpeg-dir had never been specified...
If you are running PHP 5.1 i this should work.I've found a bug in CentOS 4.x that, while previously addressed, does not seem to be directly addressed here as far as the nature of the bug is concerned.
If you are having a problem getting this function to work on CentOS 4.4 (may appear earlier) and are receiving this error:
Call to undefined function imagecreatefromjpeg()
This is because the installation *does* support JPG by default if you have libjpeg installed. However, the config script finds libjpeg in /usr/lib but it is never successfully added to the PHP build.
To fix this, you should recompile PHP and be absolutely sure to add '--with-jpeg-dir' to the config command. This should appear BEFORE the --with-gd option. Example:
'--with-jpeg-dir' '--with-gd'
If you don't put it before --with-gd, the option is completely ignored.
As always, be sure to do a 'make clean' before a 'make install'. I made the mistake of forgetting to check and wasted 30 minutes trying to resolve this problem simply because I forgot to clean up after myself previously.
Last edited by Daniel on Fri May 11, 2007 2:15 am, edited 1 time in total.
OpenCart®
Project Owner & Developer.
Who is online
Users browsing this forum: No registered users and 4 guests