Compiling PHP5 = Zlib errors

davef8

Verified User
Joined
Feb 20, 2004
Messages
48
Location
Los Angeles
I have spent a few hours on this already and scoured the DA forums to no avail. When trying to compile PHP 5.0.3 with Apache 1.3.x it keeps erroring out because it can't find the zlib directory/files it needs.

I know this topic has been mentioned in other threads but I didn't see a solution in any of them.

The server is a dedicated RHEL 3 box. The rpm zlib-1.1.4-8.1 is already installed.

I have also installed the zlib from the archive (zlib-1.2.1.tar.gz) that the DA custom apache build system brought down. I receive the same errors when I just had the zlib RPM installed and after installing zlib from the source files.

The error is " --with-zlib-dir=/usr/lib: No such file or directory
"

I have tried the following directories in the configure file:
/usr
/usr/lib
/usr/local/lib

Nothing seems to work :confused:

/usr/local/lib contains the following files:
libcurl.a libmcrypt.la libpng.a libzzip.so
libcurl.la libmcrypt.so libpng.so libzzipwrap-0.so.10
libcurl.so libmcrypt.so.4 libpng.so.3 libzzipwrap-0.so.10.0.82
libcurl.so.3 libmcrypt.so.4.4.7 libpng.so.3.1.2.7 libzzipwrap.a
libcurl.so.3.0.0 libmhash.la libz.a libzzipwrap.la
libgd.a libmhash.so libz.so libzzipwrap.so
libgd.la libmhash.so.2 libz.so.1 php
libgd.so libmhash.so.2.0.0 libz.so.1.2.1 php.ini
libgd.so.2 libpng12.a libzzip-0.so.10 pkgconfig
libgd.so.2.0.0 libpng12.so libzzip-0.so.10.0.82
libjpeg.a libpng12.so.0 libzzip.a
libmcrypt libpng12.so.0.1.2.7 libzzip.la

Note: This is a fresh install of DA on a fresh box. The DA install completed successfully with PHP 4.x using the same configure file.
 
Well day two and still no luck. I have followed all the steps outlined here except I changed "/usr/local/" to "/usr/local/lib/"
http://www.protonicdesign.com/tutorial/sablot_and_php.php

During the compiliation process PHP seems to think that I am not specifying zlib support or a zlib directory when I clearly am in my configure file.

Please see the attached screenshot which shows the PHP compiliation errors as well as my configure file.
 

Attachments

  • php_comp.jpg
    php_comp.jpg
    121.6 KB · Views: 346
Good news, I finally got PHP to compile. The end result was this, before I followed the tutorial linked in my previous post PHP could not find zlib for some unknown reason. Then after following the steps in the tutorial I was missing a slash in my configure file. You can see this missing slash in the screenshot I previously attached. Creating that screenshot helped me identify the missing slash.

If anyone else encounters a similiar situation I recommend following the tutorial I have pasted above. Following those steps solved the problem for me.
 
Back
Top