ID:               29611
 Updated by:       [EMAIL PROTECTED]
 Reported By:      cstdenis at hotmail dot com
 Status:           Feedback
 Bug Type:         GetImageSize related
 Operating System: FreeBSD 4.9
 PHP Version:      5.0.0
 New Comment:

As far as I can see in the source zlib/gzip may NOT be compiled shared
in order for this to work either:

#if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB)
        case IMAGE_FILETYPE_SWC:
            result = php_handle_swc(stream TSRMLS_CC);
            break;
#endif

I will change the code to issue a notice instead of just returning
false.

Derick


Previous Comments:
------------------------------------------------------------------------

[2004-08-11 13:22:16] [EMAIL PROTECTED]

This one works for me:
[EMAIL PROTECTED]:~$ php -r
'var_dump(getImageSize("hottest_duck_in_town.swf"));'
array(5) {
  [0]=>
  int(550)
  [1]=>
  int(400)
  [2]=>
  int(13)
  [3]=>
  string(24) "width="550" height="400""
  ["mime"]=>
  string(29) "application/x-shockwave-flash"
}
[EMAIL PROTECTED]:~$ php -v
PHP 5.0.1-dev (cli) (built: Aug 11 2004 08:20:08) (DEBUG)
Copyright (c) 1997-2004 The PHP Group

But it is a compressed shockwave flash movie, so I think it's that
you're missing zlib/gzip support in your PHP version. Do you have a
link to a phpinfo() output?

------------------------------------------------------------------------

[2004-08-11 13:17:27] cstdenis at hotmail dot com

As far as I can tell, any swf file. Here are 2 that are known to be
affected.

http://www.fanart-central.net/images/a/anime_pat/hottest_duck_in_town.swf
http://www.fanart-central.net/images/t/TX2/Untitled_1_Scene_2.swf

The first one I know worked before I upgraded to php5, becasue I was
using it for testing a few days before.

------------------------------------------------------------------------

[2004-08-11 13:07:34] [EMAIL PROTECTED]

Please provide a link to the .swf file in question.

------------------------------------------------------------------------

[2004-08-11 13:04:41] cstdenis at hotmail dot com

Description:
------------
GetImageSize returns false for swf files. This worked fine when I was
using php4.3.8, but after upgrading to 5 it no longer returns the size,
just false.

Perhaps an additional library is needed for this to work with flash,
but nothing like that is said in the documentation.

I am using Apache 2

I have a reasonably normal php.ini, register globals is on, rest is
more or less standard.

Configure Command =>  './configure' '--enable-versioning'
'--enable-memory-limit' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-spl'
'--with-regex=php' '--with-apxs2=/usr/local/sbin/apxs' '--disable-ipv6'
'--prefix=/usr/local' 'i386-portbld-freebsd4.9'



As is the setup of the new php FreeBSD ports, most of my modules are
dynamic (loaded .so files) insted of static compiled. Here is a list of
them

extension=/usr/local/lib/php/20040412/bz2.so
extension=/usr/local/lib/php/20040412/ctype.so
extension=/usr/local/lib/php/20040412/dio.so
extension=/usr/local/lib/php/20040412/dom.so
extension=/usr/local/lib/php/20040412/ftp.so
extension=/usr/local/lib/php/20040412/gd.so
extension=/usr/local/lib/php/20040412/iconv.so
extension=/usr/local/lib/php/20040412/imagick.so
extension=/usr/local/lib/php/20040412/imap.so
extension=/usr/local/lib/php/20040412/mbstring.so
extension=/usr/local/lib/php/20040412/mcrypt.so
extension=/usr/local/lib/php/20040412/mhash.so
extension=/usr/local/lib/php/20040412/mysql.so
extension=/usr/local/lib/php/20040412/openssl.so
extension=/usr/local/lib/php/20040412/pcre.so
extension=/usr/local/lib/php/20040412/posix.so
extension=/usr/local/lib/php/20040412/session.so
extension=/usr/local/lib/php/20040412/simplexml.so
extension=/usr/local/lib/php/20040412/sockets.so
extension=/usr/local/lib/php/20040412/sqlite.so
extension=/usr/local/lib/php/20040412/tokenizer.so
extension=/usr/local/lib/php/20040412/xml.so
extension=/usr/local/lib/php/20040412/zip.so
extension=/usr/local/lib/php/20040412/zlib.so

Reproduce code:
---------------
var_dump(GetImageSize("SomeFlashFile.swf"));
//will produce false in php5, returns normal data in php4.3.8

var_dump(GetImageSize("SomePicture.jpg"));
//Works fine in both versions

Expected result:
----------------
see inline comments

Actual result:
--------------
see inline comments


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29611&edit=1

Reply via email to