openSUSE Forums > Programming/Scripting » PHP: Enable static version of zlib

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read

Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 20-Nov-2008, 07:15
Puzzled Penguin
 
Join Date: Nov 2008
Posts: 1
hyperionyx hasn't been rated much yet
Default PHP: Enable static version of zlib

HTML Code:
> cat /etc/SuSE-release 
SUSE LINUX 10.1 (i586)
VERSION = 10.1
Hi,

I need to determine the dimensions of compressed swf-files. The function getimagesize() returns false and triggers a notice:
HTML Code:
> php5 -r 'var_dump(getimagesize("f2fadb2a84e6cd697c62a25563641dac87dc07fe.swf"));'
PHP Notice:  getimagesize(): The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled in Command line code on line 1
bool(false)
zlib, zlib-devel and php5-zlib are installed. On my OS X and Debian machines there are no errors, but I don't know how to fix this on SuSe. PHP version is 5.2.6, configure command is the following:

HTML Code:
'../configure' '--prefix=/usr' '--datadir=/usr/share/php5' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--with-libdir=lib' '--includedir=/usr/include' '--sysconfdir=/etc/php5/apache2' '--with-config-file-path=/etc/php5/apache2' '--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml' '--enable-session' '--with-mm' '--with-pcre-regex' '--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' '--with-apxs2=/usr/sbin/apxs2' '--disable-all' '--disable-cli'
I did not compile PHP, I installed it with smart. Google did not help, I hope someone in this forum can.
Reply With Quote
  #2 (permalink)  
Old 24-Nov-2008, 14:25
adriandelatabla's Avatar
Puzzled Penguin
 
Join Date: Nov 2008
Posts: 47
adriandelatabla hasn't been rated much yet
Default Re: PHP: Enable static version of zlib

Did you check this in your configure command line?
Code:
'--disable-static' '--enable-shared'
It seems that you are instructing php to build with shared libraries only.
Reply With Quote
  #3 (permalink)  
Old 04-Jul-2009, 12:16
Puzzled Penguin
 
Join Date: Jul 2009
Posts: 1
chattyboy hasn't been rated much yet
Send a message via MSN to chattyboy
Default Re: PHP: Enable static version of zlib

Hi!
I faced same problem today, can not get correct values for getimagesize(*.swf)...

Apache and PHP5 were installed through YAST

Code:
yast2 -i apache2 apache2-devel apache2-mod_perl apache2-mod_php5 apache2-prefork perl-HTML-Parser perl-HTML-Tagset perl-Tie-IxHash perl-URI perl-libwww-perl php5 php5-devel zlib zlib-devel

yast2 -i php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dbase php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-mysql php5-ncurses php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm ImageMagick curl
if i ran
Code:
./configure ... --with-zlib
for downloaded from php.net source zlib works as it should

Is it possible to add " --with-zlib" to YAST PHP installation? Or is there any different way out?

P.S. Sorry for my english
Reply With Quote
  #4 (permalink)  
Old 04-Jul-2009, 21:35
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,109
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: PHP: Enable static version of zlib

No, you have to build your own PHP with zlib static. It's a compilation issue, not an install issue.

But you could consider another way out of your problem:

SWF header parser (flash, html parser, swf, frame) - PHP Classes
Reply With Quote
Reply

Bookmarks

Tags
php, swf, zlib


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2