/usr/bin/ld: cannot find -lz
It means that it doesn't find the archive libz.a in its search path.
Check if you have this file in /apps/lib
If not there is a problem with the zlib installation.
If yes, have you correctly set the two environment variables :
export LDFLAGS="-L /apps/lib"
export CPPFLAGS="-I /apps/include"
I realize that you wrote :
I am currently trying to install Apache/php on a Debian sarge server
i dont have root access
I am not convinced that you can do this without root privileges.
So I suggest you ask for the root password and install precompiled packages for Debian sarge.
Or ask the server administrator to install the packages for you with