imagecreatefromgif fails for a valid image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I get a failure in creating a gif. php error log shows this:

Sep 24 00:25:47 thushw-laptop apache2: PHP Warning:  imagecreatefromgif() [
function.imagecreatefromgif function.imagecreatefromgif ]:
'/home/thushw/mocha_src/LiveMocha/trunk/src/wwwroot/app/webroot/img/new/button-middle.gif'
is not a valid GIF file in
/home/thushw/mocha_src/LiveMocha/trunk/src/wwwroot/app/webroot/button.php on
line 30

the gif can be viewed by gthumb. it seems ok.

the problem is only for some gifs. Most gifs, all pngs, jpegs that i've
tested so far work.

i'm running php5 on ubuntu (uname -a : Linux thushw-laptop 2.6.20.3-ubuntu1
#2 SMP Sun Apr 15 11:26:58 PDT 2007 i686 GNU/Linux)

phpinfo shows:

gd
GD Support 	enabled
GD Version 	2.0 or higher
FreeType Support 	enabled
FreeType Linkage 	with freetype
FreeType Version 	2.2.1
T1Lib Support 	enabled
GIF Read Support 	enabled
GIF Create Support 	enabled
JPG Support 	enabled
PNG Support 	enabled
WBMP Support 	enabled

from what i've read so far, seems like i need gd lib >=2.0.28. from phpinfo
output it is not clear if i have the right version. i use: apt-get install
php5-gd to install gd

these are the files i think are of importance:

/usr/lib/libgd.so.2.0.34
/usr/lib/libgd.so.2

[the second is a symlink to the first]

>> ls -l /usr/lib/libgd.so.2
lrwxrwxrwx 1 root root 15 2007-09-24 00:25 /usr/lib/libgd.so.2 ->
libgd.so.2.0.34

how do i debug this further?  any help greatly appreciated. this problem
doesn't appear with the gd we have installed on our centos servers. seems to
happen only on my ubuntu install.

thushara
-- 
View this message in context: http://www.nabble.com/imagecreatefromgif-fails-for-a-valid-image-tf4507593.html#a12855355
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux