Fatal error: Call to undefined function: imagecreatefromjpeg() in...

This is a discussion on Fatal error: Call to undefined function: imagecreatefromjpeg() in... within the PHP Language forums, part of the PHP Programming Forums category; I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-12-2003
Daniel Hansen
 
Posts: n/a
Default Fatal error: Call to undefined function: imagecreatefromjpeg() in...


I am getting a "Fatal error: Call to undefined function:
imagecreatefromjpeg() in..." error in one of my scripts, and after doing
a bit of searching on the 'net I found various messages relating to a
failure to have the GD library installed. However, my phpinfo() reports
(in the Apache GD section):

GD Support enabled
GD Version bundled (2.0 compatible)
GIF Read Support enabled
PNG Support enabled
WBMP Support enabled


I tried running a configure/make/make install with the following
configure command line...

../configure --with-mysql --with-apxs2
--with-zlib-dir=/etc/rpms/php-4.3.1/ext/zlib --with-png
--with-png-dir=/usr/lib --with-jpeg --with-jpeg-dir=/usr/lib --with-gd

....with no change in status.

What puzzles me is that phpinfo() also reports...
Configure Command './configure' '--with-mysql' '--with-apxs2'
.... not reflecting the options I specified.

I suspect I am doing something VERY wrong (i.e. stupid) -- but am not
sure where to look next.

HELP!!!

-dh



------------------------------------------------
Dan Hansen
------------------------------------------------
Reply With Quote
  #2 (permalink)  
Old 09-12-2003
Gary Petersen
 
Posts: n/a
Default Re: Fatal error: Call to undefined function: imagecreatefromjpeg() in...

A horsie named Daniel Hansen demonstrated surprising intelligence and its
ability to use morse code on Thu, 11 Sep 2003 22:54:13 -0500 when it
tapped <6if2mvga5b18ifvh0bgilkh93ppvt9776o@4ax.com> with its hoof:


> [...]
> I tried running a configure/make/make install with the following
> configure command line... [...]
>
> What puzzles me is that phpinfo() also reports...
> Configure Command './configure' '--with-mysql' '--with-apxs2'
> ... not reflecting the options I specified.
>


Perhaps your httpd.conf is still loading the old version
of the library. When you did "make install," the module
might have been installed in a different place than
the original library was.

If that's so, you would have to change httpd.conf to
reflect the location of your new php library; then
stop and start apache.

HTH

Reply With Quote
  #3 (permalink)  
Old 09-12-2003
Daniel Hansen
 
Posts: n/a
Default Re: Fatal error: Call to undefined function: imagecreatefromjpeg() in...

On Fri, 12 Sep 2003 08:27:27 GMT, Gary Petersen
<garyp1492@remove.meearthlink.invalid>, wrote:

>>Perhaps your httpd.conf is still loading the old version
>>of the library. When you did "make install," the module
>>might have been installed in a different place than
>>the original library was.
>>
>>If that's so, you would have to change httpd.conf to
>>reflect the location of your new php library; then
>>stop and start apache.


'fraid not -- there are no references to gd or anything seemingly
relevant in my httpd.conf.

Thanks, though!
dh
------------------------------------------------
Dan Hansen
------------------------------------------------
Reply With Quote
  #4 (permalink)  
Old 09-12-2003
Randell D.
 
Posts: n/a
Default Re: Fatal error: Call to undefined function: imagecreatefromjpeg() in...


"Daniel Hansen" <drhansenjr@mindspring.com> wrote in message
news:6if2mvga5b18ifvh0bgilkh93ppvt9776o@4ax.com...
>
> I am getting a "Fatal error: Call to undefined function:
> imagecreatefromjpeg() in..." error in one of my scripts, and after doing
> a bit of searching on the 'net I found various messages relating to a
> failure to have the GD library installed. However, my phpinfo() reports
> (in the Apache GD section):
>
> GD Support enabled
> GD Version bundled (2.0 compatible)
> GIF Read Support enabled
> PNG Support enabled
> WBMP Support enabled
>
>
> I tried running a configure/make/make install with the following
> configure command line...
>
> ./configure --with-mysql --with-apxs2
> --with-zlib-dir=/etc/rpms/php-4.3.1/ext/zlib --with-png
> --with-png-dir=/usr/lib --with-jpeg --with-jpeg-dir=/usr/lib --with-gd
>
> ...with no change in status.
>
> What puzzles me is that phpinfo() also reports...
> Configure Command './configure' '--with-mysql' '--with-apxs2'
> ... not reflecting the options I specified.
>
> I suspect I am doing something VERY wrong (i.e. stupid) -- but am not
> sure where to look next.
>
> HELP!!!
>
> -dh
>
>
>
> ------------------------------------------------
> Dan Hansen
> ------------------------------------------------


I'm using PHP 4.3.3 with Apache 1.3.28 and have the same problem - My news
posts were a bit behind but I notice you raised the same question before
me - I thought I'd throw in my two pence worth and say that I found
imagecreatefromgif() worked for me, whereas imagecreatefromjpeg() failed
with the same fatal error as yours. I'm wondering if there is a dependancy
on an external jpeg library which you/I might not have installed.


Reply With Quote
  #5 (permalink)  
Old 09-13-2003
Randell D.
 
Posts: n/a
Default Re: Fatal error: Call to undefined function: imagecreatefromjpeg() in...


"Daniel Hansen" <drhansenjr@mindspring.com> wrote in message
news:6if2mvga5b18ifvh0bgilkh93ppvt9776o@4ax.com...
>
> I am getting a "Fatal error: Call to undefined function:
> imagecreatefromjpeg() in..." error in one of my scripts, and after doing
> a bit of searching on the 'net I found various messages relating to a
> failure to have the GD library installed. However, my phpinfo() reports
> (in the Apache GD section):
>
> GD Support enabled
> GD Version bundled (2.0 compatible)
> GIF Read Support enabled
> PNG Support enabled
> WBMP Support enabled
>
>
> I tried running a configure/make/make install with the following
> configure command line...
>
> ./configure --with-mysql --with-apxs2
> --with-zlib-dir=/etc/rpms/php-4.3.1/ext/zlib --with-png
> --with-png-dir=/usr/lib --with-jpeg --with-jpeg-dir=/usr/lib --with-gd
>
> ...with no change in status.
>
> What puzzles me is that phpinfo() also reports...
> Configure Command './configure' '--with-mysql' '--with-apxs2'
> ... not reflecting the options I specified.
>
> I suspect I am doing something VERY wrong (i.e. stupid) -- but am not
> sure where to look next.
>


I have a post with a similar subject - I've included my compile options that
might help since I *had* the same problem (though phpinfo() did not report
the same as yours, imagecreatefromjpeg() was undefined).


Reply With Quote
  #6 (permalink)  
Old 09-13-2003
Daniel Hansen
 
Posts: n/a
Default Re: Fatal error: Call to undefined function: imagecreatefromjpeg() in...


This is what finally worked for me. Not sure whether it was the "make
clean" or adding exif support -- but it worked!

make clean
../configure --with-mysql --with-apxs2 --with-xpm-dir --with-png
--with-png-dir --with-jpeg-dir --enable-exif --with-zlib-dir --with-gd
> configure.2003.09.12.dh5.log

make
make install
libtool --finish /etc/rpms/php-4.3.1/libs
apachectl -k stop
service httpd start




On Fri, 12 Sep 2003 22:25:05 GMT, "Randell D."
<you.can.email.me.at.randelld@yahoo.com>, wrote:

>> ....
>> ....
>> ....


>>
>>I have a post with a similar subject - I've included my compile options that
>>might help since I *had* the same problem (though phpinfo() did not report
>>the same as yours, imagecreatefromjpeg() was undefined).
>>


------------------------------------------------
Dan Hansen
------------------------------------------------
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0