Forum Moderators: phranque

Message Too Old, No Replies

PHP reconfigure

         

mexicoshanty

11:23 am on Aug 21, 2005 (gmt 0)

10+ Year Member



hi all,

When i initially compiled and installed apache, mysql and php i didn't install zlib for php thinking i wouldn't need it... i was wrong. Do i need to reinstall php, or can i just update it some how. The server this is on is at a remote location so a stuff up would be pretty bad news. I’m trying to find out the safest and easiest way to get the zlib module working with php. Any suggestions would be much appreciated

jamie

11:39 am on Aug 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



mexicoshanty,

there may be other ways, but i would:

1) copy your entire './configure ...' line from a phpinfo() page (if you don't already have one, create a php page with just the command phpinfo() in it, and view it in a browser)

2) go to the directory where you built your php from souce and 'make clean', then paste your './configure ....' line adding '--with-zlib-dir' to it.

3) then 'make', stop apache, 'make install' and start apache to install the new php over the old one. make backups of your httpd.conf and php.ini files before make installing, as make install will overwrite them.

if you have already installed php from source, then the above should be fairly clear. i have a mirror copy of my server at home to test on - if you are worried, try doing that before risking it on a live server. it shouldn't however present a problem. the only downtime you have are the 20 seconds or so, whilst you have stopped apache before running 'make install'.

hth

mexicoshanty

1:54 am on Aug 22, 2005 (gmt 0)

10+ Year Member



Thanks Jamie, it worked a charm!

jamie

1:05 pm on Aug 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



glad it worked. no matter how many times i do it, i always get a little nervous before starting apache again ;)