php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32358 GD Functionality Missing JPEG
Submitted: 2005-03-18 06:38 UTC Modified: 2005-03-29 22:07 UTC
From: kklee at cbs dot com Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.10 OS: Linux Fedora Core 3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kklee at cbs dot com
New email:
PHP Version: OS:

 

 [2005-03-18 06:38 UTC] kklee at cbs dot com
Description:
------------
When I ran an standard "./configure --with-zlib --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr" I am able to create PNG images but not JPEG images.  The symptoms I experienced are:

1. imagepng() works but imagejpeg() does not
2. phpinfo() does not show "JPG Support enabled" under the GD module

I have tried the gd-2.0.28 and gd-2.0.32-3.rpm from Fedora Core installed.  I also have libjpeg-6b-33 and libpng-1.2.7-1 rpms installed.

I couldn't figure out what else to try to I compiled php 4.3.9 with the exact same options and all JPEG features listed above works.  Am I the only one unable to utilize JPEG in 4.3.10?  Sorry for the neophyte bug report but I could not find the related bug in your bug database.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-18 09:58 UTC] sniper@php.net
You have to install the -devel RPMs too.

 [2005-03-22 13:08 UTC] kklee at cbs dot com
Seems like a simple enough solution sniper, but that still didn't resolve my problem.  I installed the libpng-devel, libjpeg-devel and the gd-devel RPMS and then recompiled PHP again using the same options and the JPEG feature still doesn't work in GD using PHP 4.3.10 --- I compiled 4.3.9 again and that worked like a charm under the exact same environment.  I guess I'm the only one who can compile without an error but has no JPEG functionality --- during the compile, everything seems to indicate that it is okay:

checking for the location of libjpeg... /usr
checking for jpeg_read_header in -ljpeg... (cached) yes

If there was any error at all, at least that would help me find this needle in a haystack.
 [2005-03-29 22:07 UTC] kklee at cbs dot com
Well, since nobody had an answer, I had the choice of installing php4.3.9 or php5 and I chose the latter.  Not sure why the problem exists only on my setup for 4.3.10, but installing php5 (without the need to install the -devel rpms as suggested) resolved the problem.
 [2010-11-22 16:20 UTC] FractalizeR at yandex dot ru
It looks like this bug is a long ago. I've just filed it for 5.3.3: http://bugs.php.net/bug.php?id=53379&thanks=4. The cause is that these options are now not commutative. You should currently use

--with-jpeg-dir=/usr --with-png-dir=/usr --with-gd

Mind the --with-gd at the end. If you place it first, you will lack JPEG support somehow without warnings or errors.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 22:01:36 2025 UTC