Forum Moderators: phranque
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
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