There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Build PHP with zlib support


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
28-Dec-2004, 05:39 AM #1
Build PHP with zlib support
I got the admin for my ISP to install the Archive Mail Plugin for Squirrelmail.

Problem is, the plugin requires zlib support in PHP for it to work. However the php package installed was not built with zlib support. The admin said if I give him specific directions, he'll rebuild php, but they have to be super step-by-step, specific directions.

I've read install files and guides, but they are not even close to specific enough.

The server is question is running the following on RedHat ( I think 8)
Apache/1.3.31 (Unix) PHP/4.3.3 mod_perl/1.29


Is there a php 4.3.3 rpm that he can download that will work with apache 1.3.31, that also has zlib support?

If not, he wants to build

php.4.3.10 with imap support and zlib support
zlib 1.2.2 (has no problem building this)
apache 1.3.33 with support for modules etc.

I definitely need more info than ./configure --with-zlib to build php. (a list of ALL dependencies would help)

I can try out your suggestions only on debian woody. I'm on dialup, so the less dependencies I have to download to build, the better.

Also, if you can point me to some new deb packages that I can also try for myself to see if they work with the archive plugin.

On windows, you can use a php apache module or the cgi version. Is that how it works on linux? If so, I would need directions for building the module too.

I built GTK2 (so I could use a newer version of Gaim) on debian before. It took about a week to find, download and build all the dependencies so I could actually build GTK2, but I successfully did that. (So your directions should make at least some sense to me)

It's a lot to ask, but any help is appreciated.

Thanks
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Squashman's Avatar
Distinguished Member with 12,590 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
28-Dec-2004, 09:57 AM #2
You will need to configure and compile it manually.

You will need to configure PHP --with-zlib[=DIR]
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
28-Dec-2004, 11:20 PM #3
Yes, but is the zlib directory supposed to be the directory that the built binaries for zlib are at or is the directory supposed to be where zlib.h and the other source files are at?

I'm thinking the latter.

I'm not sure if I actually have to build zlib first, if it's just going to be built into php.

For example, say if I download the zlib source so that zlib.h is at /zlib-1.2.2/zlib.h :

Would I do this in the php directory?

./configure --with-zlib=/zlib-1.2.2

Or would have have to build the binaries for zlib first?

is --with-imap specified by default or do I have to add that?

All the readmes, install files and guides show you switches you can use, but I don't know which ones are necessary.

Basically I want the same functionality that you get from downloading the win32 php cgi+module binaries.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
29-Dec-2004, 01:57 AM #4
O.K. here's what I did.

Used KDE package manager to install the following packages:

php4 debian package - PHP 4.1.2 (Not the cgi, the php module, which has built-in zlib support).

php4-imap debian package - PHP imap module . It automatically edited /etc/php4/apache/php.ini to load the module.

apache debian package - 1.3.26

I uncommented the LoadModule line in httpd.conf to load the php module.

<?php phpinfo() ?> shows that zlib 1.14 support enabled and zlib foopen support is enabled. It also shows imap support is enabled.

Also, libz.so.1.1.4 is in /usr/lib
There's a symlink to libz.so.1.1.4 named libz.so.1 in /usr/lib


There's also libzvt.so.2.2.10 and a symlink to it named libzvt.so.2

Here's what php was configured with.

Code:
./configure --prefix=/usr
            --with-apxs=/usr/bin/apxs
            --with-regex=php
            --with-config-file-path=/etc/php4/apache
            --disable-rpath
            --disable-debug
            --enable-memory-limit
            --enable-calendar
            --enable-sysvshm
            --enable-track-vars
            --enable-trans-sid
            --enable-bcmath
            --with-bz2
            --enable-ctype
            --with-db2
            --with-icnov
            --with-ndbm
            --enable-exif
            --enable-filepro
            --enable-ftp
            --with-gettext
            --enable-mbstring
            --with-pcre-regex=/usr
            --enable-shmop
            --enable-sockets
            --enable-wddx
            --with-xml=/usr
            --with-expat-dir=/usr
            --enable-yp
            --with-zlib
            --without-pgsql
            --disable-static
            --with-layout=GNU
            --with-curl=shared,/usr
            --with-dom=shared,/usr
            --with-zlib-dir=/usr
            --with-gd=shared,/usr
            --with-jpeg-dir=shared,/usr
            --with-xpm-dir=shared,/usr/X11R6
            --with-png-dir=shared,/usr
            --with-freetype-dir=shared,/usr
            --with-imap=shared,/usr
            --with-ldap=shared,/usr
            --with-mcal=shared,/usr
            --with-mhash=shared,/usr
            --with-mm
            --with-mysql=shared,/usr
            --with-unixODBC=shared,/usr
            --with-recoded=shared,/usr
            --enable-xslt
            --with-xslt-sablot=shared,/usr
            --with-snmp=shared
            --enabled-ucd-snmp-hack
            --with-sybase-ct=shared,/usr
            --with-ttf=shared,/usr
            --with-t1lib=shared,/usr
Installing the packages works as I want it to.

Now the admin should be able to do the same type of thing on RedHat: right?

If not, do you think that should be enough info to build php? I didn't try to build myself.

I'd still like to know if the php module only works with a certain version of apache or not?

Also, have and links to newer RPM packages for php, apache, etc?

Can Redhat handle deb packages like debian can with alien?

Thanks
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:40 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.