jpeg support in 5.0.4, (and libs)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I recently installed PHP 5.0.4 on my Fedora system. I compiled in the GD  
    option. (--with-gd). Then I tested the ImageTypes() function. It  
seems .png and .gif (IMG_PNG and IMG_GIF) are supported, but jpeg  
(IMG_JPEG) is not. Is this expected? How do I get .jpeg support?

-- segway --

Out of curiousity, I checked the php-config file in my ../php/bin dir
and here is the libs that are listed:

libs="-lcrypt   -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl  
-lnsl  -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz  
-lm -lcrypt "

-lz is listed 6 times, -lcrypt 4 times, -lm 3 times, etc.

Is this really how it should be? I'm guessing listing the libs so many
times doesn't do any harm, but what's the point?

B Squared

By and large gentlemen believe in God because, by and large, they are
confident that God believes in them.
                        -- Douglas Sutherland, The English Gentleman

Re: jpeg support in 5.0.4, (and libs)

Quoted text here. Click to load it

 You may have to specifically use --with-jpeg-dir in configure - I've got
"--with-jpeg-dir=/usr" in the configure line I used for building PHP, which
implies at some point I added it on because JPEG support wasn't working.

Quoted text here. Click to load it

 It's probably just output automatically by the build system, with each
extension adding on all the libraries they depend on, and more than one
requires libz, libcrypto, etc. Presumably the build system doesn't bother
eliminating duplicates, because the linker will anyway.
Andy Hassall :: :: :: disk and FTP usage analysis tool

Re: jpeg support in 5.0.4, (and libs)

Andy Hassall wrote:
Quoted text here. Click to load it

So I did as you suggested, the jpeg lib was in /usr/lib. I looked at the
configuration output and saw, among other stuff

      checking for the location of libjpeg... /usr/lib

      checking for jpeg_read_header in -ljpeg... yes

and there were no errors, so it looks like it worked. But the  
ImageTypes() function still doesn't recognize IMG_JPEG. Any other  

Thanks in advance.

B Squared

Site Timeline