|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-08-11 13:04 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
This one works for me: derick@kossu:~$ 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" } derick@kossu:~$ 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?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