php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14579 ImageTypes() returns no supported Image Types
Submitted: 2001-12-18 09:39 UTC Modified: 2002-03-17 11:46 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: alex dot killing at gmx dot de Assigned:
Status: Closed Package: GD related
PHP Version: 4.1.0 OS: RedHat6.2
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alex dot killing at gmx dot de
New email:
PHP Version: OS:

 

 [2001-12-18 09:39 UTC] alex dot killing at gmx dot de
gd1.3/PHP4.1.0

[...]
$im_types = @ImageTypes();
if(empty($im_types))
{
  echo "Error";
}
else
{
  if($im_types & IMG_JPG)
  {
[...]

-> Error is echoed.


php_info() says:

GD support enabled
GD version between 1.3 and 1.6.1
GIF Read Support enabled
GIF Create Support enabled


The same script with PHP4.0.3pl1 and PHP4.0.6 acts as expected.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-19 08:56 UTC] sander@php.net
Remove the @ before ImageTypes. Does it print a error now?
 [2002-01-09 02:10 UTC] lobbin@php.net
No feedback. Closing.
 [2002-02-12 11:09 UTC] alex dot killing at gmx dot de
Sorry for the late feedback. No Error after removing the @. Reopened.
 [2002-02-14 10:52 UTC] magnusj at exense dot com
I have tested this on several different versions of PHP and GDLib and it doesn't work if the configure doesn't find your libpng and libjpeg.

If you carefully read the output of the configure
script you realize that maybe libpng and libjpeg
isn't found even if you have them installed in default
locations. I have tested this both on RedHat7.1 and SuSE7.3
and I had to specify the paths myself to make it work.

'./configure' '--with-apache=../apache_1.3.23' '--with-zlib-dir=/usr/lib' '--with-ftp' '--with-png-dir=/usr/lib' '--with-jpeg-dir=/usr/lib' '--with-gd=../gd-1.8.4' '--disable-debug' '--with-sybase-ct=/opt/sybase-11.9.2' 

If I leave out --with-png-dir and --with-jpeg-dir imagetypes() returns nothing. You can also check the output
of phpinfo() and you will see that the GD Support is enabled but it doesn't say anything about PNG and JPEG support being enabled.

So don't forget to specify your libpng and libjpeg dirs...
 [2002-02-14 13:48 UTC] alex dot killing at gmx dot de
In this case, the problem is gif support related. As I wrote php_info() returns that gif support is enabled, but ImageTypes() does not. This absolutely makes no sense to me.
 [2002-03-03 14:32 UTC] jamie at jamiebecker dot com
We have the same issue on both Red Hat 7.2 and FreeBSD; there has been some discussion on the Typo3 mailing list (http://www.typo3.com) as well -- apparently there are others who have experienced this. It appears to occur at a minimum in 4.1.0 and 4.1.2, but not <=4.0.6
 [2002-03-17 11:46 UTC] sander@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC