|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-01 23:40 UTC] sniper@php.net
[2005-09-09 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 04:00:01 2025 UTC |
Description: ------------ getimagesize() returns false for compressed swf files, and issues a notice. This is due to the lines in ext/standard/image.c: #if HAVE_ZLIB && !defined(COMPILE_DL_ZLIB) result = php_handle_swc(stream TSRMLS_CC); #else php_error_docref(NULL TSRMLS_CC, E_NOTICE, "The image is a compressed SWF file, but you do not have a static version o f the zlib extension enabled."); #endif The "!defined(COMPILE_DL_ZLIB)" part of the if does not work; besides, it shouldn't even be there. So, when trying to do getimagesize() on a compressed swf: 1. Even when zlib is statically compiled, !defined(COMPILE_DL_ZLIB) fails, so you get the pretty notice no matter what. 2. Removing that part of the if, it works even when compiled --with-zlib=shared. Using zlib-1.2.1.2, zlib-devel-1.2.1.2. The same issue with the latest snapshot of php. Reproduce code: --------------- <?php error_reporting( E_ALL | E_STRICT); print_r( getimagesize('compressed.swf') ); print_r( getimagesize('not_compressed.swf') ); ?> Expected result: ---------------- Array ( [0] => 550 [1] => 400 [2] => 13 [3] => width="550" height="400" [mime] => application/x-shockwave-flash ) Array ( [0] => 550 [1] => 400 [2] => 4 [3] => width="550" height="400" [mime] => application/x-shockwave-flash ) Actual result: -------------- Notice: getimagesize(): The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled. in /_index.php on line 14 Array ( [0] => 550 [1] => 400 [2] => 4 [3] => width="550" height="400" [mime] => application/x-shockwave-flash )