You are not logged in.

#1 2008-02-14 11:05:54

kito
Member
Registered: 2008-02-14
Posts: 4

zlib compression support in php

hi everyone,

i am triing to install joomla to use it for web development, but i encountred a problem. in the pre-installation check it says i have no zlib compression support. i got trough php.ini and tried to set it but whatever i try the pre-instalation check complain on zlib missing. here http://www.php.net/manual/en/ref.zlib.php i found php should be compiled with

--with-zlib[=DIR]

but i havent found this in configuration commands table of phpinfo() output. do i need to recompile php package or do i need something to be installed? now zlib stuf in my php.ini is configured as in link i have provided.

any suggestions? thanks.

kito

Offline

#2 2008-02-15 13:47:23

kito
Member
Registered: 2008-02-14
Posts: 4

Re: zlib compression support in php

please help me somehow.
arch's php package is configured in this way:

'./configure' '--prefix=/usr' '--sysconfdir=/etc/php' '--with-layout=GNU' '--with-config-file-path=/etc/php' 
'--with-config-file-scan-dir=/etc/php/conf.d' '--enable-inline-optimization' '--disable-debug' '--disable-rpath' 
'--disable-static' '--enable-shared' '--with-apxs2' '--disable-cli' '--with-openssl=shared' '--with-zlib=shared' 
'--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' 
'--enable-dba=shared' '--without-db2' '--without-db3' '--with-db4=shared' '--with-gdbm=shared' 
'--enable-dbase=shared' '--enable-exif=shared' '--enable-ftp=shared' '--with-gd=shared' '--enable-gd-native-ttf' 
'--with-jpeg-dir=shared,/usr' '--with-png-dir=shared,/usr' '--with-gettext=shared' '--with-imap=shared' 
'--with-imap-ssl=shared' '--with-ldap=shared' '--enable-mbstring=shared' '--with-mcrypt=shared' 
'--with-mysql=shared' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysql=shared' '--with-mysqli=shared' 
'--with-ncurses=shared' '--with-unixODBC=shared,/usr' '--enable-pdo=shared' '--with-pdo-mysql=shared' 
'--with-pdo-sqlite=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' 
'--with-sqlite=shared' '--with-pgsql=shared' '--enable-shmop=shared' '--with-snmp=shared' 
'--enable-soap=shared' '--enable-sqlite-utf8=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' 
'--enable-sysvshm=shared' '--with-tidy=shared' '--with-xsl=shared' '--enable-zip=shared' 
'--enable-posix=shared' '--enable-sockets=shared' '--enable-xml' '--with-ttf=shared' '--enable-session=shared' 
'--with-regex=php' '--enable-mbstring=all' '--enable-mbregex' '--enable-json=shared' '--with-iconv=shared' 
'--with-xmlrpc=shared' '--with-pspell=shared' '--with-freetype-dir=shared,/usr' 
'--with-mime-magic=shared'

no idea how to solve this issue? is there anybody with zlib working with php just after installation? please check your's phpinfo() output for table with information on zlib. if you can find it there you have got zlib working unlike me.

Offline

#3 2008-02-15 13:57:19

freakcode
Member
From: São Paulo - Brazil
Registered: 2007-11-03
Posts: 410
Website

Re: zlib compression support in php

--with-zlib=shared

I guess this flag means PHP to load zlib on the fly. I'm pretty sure you should have /lib/libz.so.1, so maybe you need to adjust paths, else Joomla zlib detection may be broken.

You can test if PHP has zlib support enabled with this script:

<?php

$filename = tempnam('/tmp', 'zlibtest') . '.gz';
echo "<html>\n<head></head>\n<body>\n<pre>\n";
$s = "Only a test, test, test, test, test, test, test, test!\n";

// open file for writing with maximum compression
$zp = gzopen($filename, "w9");

// write string to file
gzwrite($zp, $s);

// close file
gzclose($zp);

// open file for reading
$zp = gzopen($filename, "r");

// read 3 char
echo gzread($zp, 3);

// output until end of the file and close it.
gzpassthru($zp);
gzclose($zp);

echo "\n";

// open file and print content (the 2nd time).
if (readgzfile($filename) != strlen($s)) {
        echo "Error with zlib functions!";
}
unlink($filename);
echo "</pre>\n</body>\n</html>\n";

?>

Source: http://www.php.net/zlib

Offline

#4 2008-02-15 13:59:26

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: zlib compression support in php

pacman -Qi zlib
pacman -Ql zlib

what do those give?

Offline

#5 2008-02-15 14:01:03

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: zlib compression support in php

Have you uncommented "extension=zlib.so" in /etc/php/php.ini?

Offline

#6 2008-02-15 15:40:20

kito
Member
Registered: 2008-02-14
Posts: 4

Re: zlib compression support in php

lucke wrote:

Have you uncommented "extension=zlib.so" in /etc/php/php.ini?

so finaly the solution was under my nose. in my php.ini was no (un)commented extension=zlib.so line so i did nothing to add it. i checked php.ini.packnew an found it there so i added it into php.ini. thanks guys for help. it was stupid problem. i do apologize.

Offline

Board footer

Powered by FluxBB