Bug 150213

Summary: Freebsd8.1 php Zlib library installnation bug
Product: Documentation Reporter: coco <sujoe_2006>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description coco 2010-09-02 05:20:02 UTC
my web server environment is :
apache:2.2,*
php:5.3.2
mysql 5.1,*
php-extension (zlib library is checked)

when i use the function "gzcompression",i get an error:
Fata error :Call to undefined function gzcompress();

I get solution information by GOOGLE,it needs Zlib libray,Then , I get the my server's zlib library version is 1.2.3 by phpinfo(),but "Registered PHP Streams" have no "compress.zlib " ,Why?I have checked "zlib library support" at the step of installing php-extension?

Fix: 

For sloving the problem,I do somethings:
#vi /usr/local/etc/php.ini
change flowing contents :
zlib.output_compression = Off
;zlib.output_compression_level = -1
to
zlib.output_compression = On
zlib.output_compression_level = 6

then ,i restart apache ,but the error is same,so :
#vi /usr/local/etc/php/extensions.ini 
there is no "extension=zlib.so",i add it,then
&#65283;cd /usr/local/lib/php/
there three directory,but i can not find zlib.so in them,I think ,Freebsd did not install "Zlib",although I have checked it.So i must install the "Zlib" by myself:
#cd /usr/ports/archrives/php5-zlib
#make install clean
when it done,input following command:
#/usr/local/sbin/apachectl restart

Then ,the Zlib work now!
Comment 1 Alex Dupre freebsd_committer freebsd_triage 2010-09-02 08:14:31 UTC
State Changed
From-To: open->closed

Probably you checked it after installing php5-extensions.