getimagesize():The image is a compressed SWF file, but you do not have a static versi

Discussion in 'Installation/Configuration' started by Mole, Feb 26, 2009.

  1. Mole

    Mole New Member

    Hello!
    Can anybody help me solve the problem...?

    OpenSuse
    Apache 2.2.4.
    PHP 5.2.8.
    ISPconfig 2.2.29.

    script:
    PHP:
    <?php

    list($width$height$type$attr) = getimagesize("flash_file.swf");

    echo 
    "Image width " .$width;
    echo 
    "<BR>";
    echo 
    "Image height " .$height;
    echo 
    "<BR>";
    echo 
    "Image type " .$type;
    echo 
    "<BR>";
    echo 
    "Attribute " .$attr;

    ?>
    returns:
    Code:
    Image width
    Image height
    Image type
    Attribute 
    
    but it have to return:
    Code:
    Image width 1024
    Image height 768
    Image type 13
    Attribute width="1024" height="768" 
    
    in error.log there is suc error:
    Code:
     PHP Notice:  getimagesize(): The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled in /path_to_php_file/test.php on line 3 
    info from phpinfo():
    Code:
    Registered PHP Streams: php, file, data, http, ftp, compress.bzip2, https, ftps, zip, compress.zlib 
    ...
    Registered Stream Filters: string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, bzip2.*, convert.iconv.*, zlib.* 
    ...
    zlib
    ZLib Support: enabled
    Stream Wrapper support: compress.zlib://
    Stream Filter support: zlib.inflate, zlib.deflate
    Compiled Version: 	1.2.3
    Linked Version: 1.2.3
    
    Directive:                                  Local Value	   Master Value
    zlib.output_compression:                  Off	                Off
    zlib.output_compression_level	:           -1	                -1
    zlib.output_handler: 	                      1	                  1
    
    /etc/php5/apache2/php.ini:
    Code:
    ...
    ;output_handler = 
    zlib.output_compression = off
    zlib.output.handler = On
    
    php-config:
    Code:
    srv:/ # php-config
    Usage: /usr/bin/php-config [OPTION]
    Options:
      --prefix            [/usr]
      --includes          [-I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib]
      --ldflags           []
      --libs              [-lcrypt   -lcrypt -lmm -lpcre -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt ]
      --extension-dir     [/usr/lib/php5/extensions]
      --include-dir       [/usr/include/php5]
      --php-binary        [/usr/bin/php5]
      --php-sapis         [cli cli]
      --configure-options [--prefix=/usr --datadir=/usr/share/php5 --mandir=/usr/share/man --bindir=/usr/bin --with-libdir=lib --includedir=/usr/include --sysconfdir=/etc/php5/cli --with-config-file-path=/etc/php5/cli --with-config-file-scan-dir=/etc/php5/conf.d --enable-libxml --enable-session --with-mm --with-pcre-regex=/usr --enable-xml --enable-simplexml --enable-spl --enable-filter --disable-debug --enable-inline-optimization --disable-rpath --disable-static --enable-shared --program-suffix=5 --with-pic --with-gnu-ld --with-system-tzdata=/usr/share/zoneinfo --enable-cli --with-pear=/usr/share/php5/PEAR --enable-bcmath=shared --enable-calendar=shared --enable-ctype=shared --enable-dbase=shared --enable-dom=shared --enable-exif=shared --enable-ftp=shared --enable-mbstring=shared --enable-mbregex --enable-pcntl=shared --enable-posix=shared --enable-shmop=shared --enable-soap=shared --enable-sockets=shared --enable-sysvmsg=shared --enable-sysvsem=shared --enable-sysvshm=shared --enable-tokenizer=shared --enable-wddx=shared --with-zlib=shared --with-bz2=shared --with-curl=shared --with-gd=shared --enable-gd-native-ttf --with-xpm-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-zlib-dir=/usr --with-t1lib=/usr --with-gettext=shared --with-gmp=shared --enable-hash=shared --with-iconv=shared --with-imap=shared --with-kerberos --with-imap-ssl --enable-json=shared --with-ldap=shared --with-ldap-sasl=/usr --with-libedit=shared,/usr --with-mcrypt=shared --with-mhash=shared --with-mysql=shared,/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=shared --with-ncurses=shared --with-unixODBC=shared,/usr --with-openssl=shared --with-pgsql=shared,/usr --with-pspell=shared --with-snmp=shared --with-xmlrpc=shared --enable-xmlreader=shared --enable-xmlwriter=shared --with-xsl=shared --with-tidy=shared,/usr --enable-dba=shared --with-db4=/usr --without-gdbm --with-cdb --with-inifile --with-flatfile --enable-pdo=shared --with-pdo_sqlite=shared,/usr --with-pdo-mysql=shared,/usr --with-pdo-pgsql=shared,/usr --with-pdo-odbc=shared,unixODBC,/usr --with-sqlite=shared,/usr --enable-sqlite-utf8 --enable-zip=shared --enable-suhosin=shared --disable-cgi]
      --version           [5.2.8]
      --vernum            [50208]
    
    Thank You!
     
  2. DjYXA

    DjYXA New Member

    do you have this in your phpinfo ??

    Code:
    gd
    GD Support 	enabled
    GD Version 	bundled (2.0.34 compatible)
    FreeType Support 	enabled
    FreeType Linkage 	with freetype
    FreeType Version 	2.3.7
    T1Lib Support 	enabled
    GIF Read Support 	enabled
    GIF Create Support 	enabled
    JPG Support 	enabled
    PNG Support 	enabled
    WBMP Support 	enabled
    XPM Support 	enabled
    XBM Support 	enabled 
    if you havent the GD in "bundle" mode, a lot of functions are desactivated... do you have to compile GD and reinstall it with bundle option enabled ;)
     
  3. Mole

    Mole New Member

    Code:
    gd
    GD Support 	enabled
    GD Version 	bundled (2.0.34 compatible)
    FreeType Support 	enabled
    FreeType Linkage 	with freetype
    FreeType Version 	2.3.5
    T1Lib Support 	enabled
    GIF Read Support 	enabled
    GIF Create Support 	enabled
    JPG Support 	enabled
    PNG Support 	enabled
    WBMP Support 	enabled
    XPM Support 	enabled
    XBM Support 	enabled 
    
    FYI - for installation I use Perfect setup manual for OpenSuse 10.3...
     
  4. DjYXA

    DjYXA New Member

    try this..

    ;zlib.output.handler = On

    Comment this line... i have this line commented and your script run fine in my server.. but i have PHP 5.2.6... PHP 5.2.8 bug? :S
     
  5. Mole

    Mole New Member

    commented out...no changes ;-(

    I had the same with PHP 5.2.6.... I though that it was the problem with 5.2.6., so - now I have PHP 5.2.8., but problem still not solved ;-(((
     

Share This Page