Dear all, I am to set up a LAMPS system (Red Hat 7.3, Apache 1.3.29, MySQL 4.0.18, PHP 4.3.4).
When trying to configure PHP with the follwing command: ./configure --with-apache=/usr/local/apache/apache_1.3.29 --with-mysql=/usr/local/mysql --with-mcrypt=/usr/local/mcrypt_2_5_7/libmcrypt-2.5.7 ... I got this: **** configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information. **** ... looking into the config.log: **** configure:55357: checking for mysql_close in -lmysqlclient configure:55376: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -Wl ,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lmysqlclient -lmcrypt -lltdl -lresolv -lm -ldl -lnsl 1>&5 /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status configure: failed program was: #line 55365 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close(); int main() { mysql_close() ; return 0; } configure:55738: checking for mysql_errno in -lmysqlclient configure:55757: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -Wl ,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lmysqlclient -lz -lmcrypt -lltdl -lresolv -lm -ldl -lnsl 1>&5 /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status configure: failed program was: #line 55746 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_errno(); int main() { mysql_errno() ; return 0; } **** ------------------------------- the solution ------------------------------- Then I visited http://mcrypt.hellug.gr/mcrypt/index.html an learned that I have to install not only libmcrypt but also mcrypt and libmhash. Here is the to do: libmcrytp: ----------- download libmcrypt-xxx.tar.gz create the following directory: / usr / local / libmcrypt copy the libmcrypt-xxx.tar.gz into that directory and move to it run the following shell (>) commands: ('xxx' is the version number) > gunzip -c libmcrypt-xxx.tar.gz | tar xf - > cd libmcrypt-xxx > ./configure --disable-posix-threads > make > make check (note: 'make check' is optional) > make install then (update your environment) add in / etc / profile the following path: /usr/local/libmcrypt/libmcrypt-xxxx (note: as I run Red Hat 7.3 I set the line a f t e r the if-part (id -u = 0 ...) with: pathmunge /usr/local / libm....) and add in / etc / ld.so.conf the following path: /usr/local/lib then run ldconfig: > ldconfig now comes the important part: > cd /usr/local/libmcrypt/libmcrypt-xxx/libltdl > ./configure --enable-ltdl-install > make > make install (maybe not needed: I also added a link in / usr / bin: ) (> cd /usr/bin) (> ln -s /usr/lib/libltdl.so.3.1.0 ltdl) mhash: ----------- download mhash-xxx.tar.gz create the following directory: / usr / local / mhash copy the mhash-xxx.tar.gz into that directory and move to it run the following shell (>) commands: ('xxx' is the version number) > gunzip -c mhash-xxx.tar.gz | tar xf - > cd mhash-xxx > ./configure > make > make check (note: 'make check' is optional) > make install mcrypt: ----------- download mcrypt-xxx.tar.gz create the following directory: / usr / local / mcrypt copy the mcrypt-xxx.tar.gz into that directory and move to it run the following shell (>) commands: ('xxx' is the version number) > gunzip -c mcrypt-xxx.tar.gz | tar xf - > cd mhash-xxx > ./configure > make > make check (note: 'make check' is optional) > make install back to PHP: -------------- move into your PHP installation directory then the following command worked on my computer: > ./configure --with-apache=/usr/local/apache/apache_1.3.29 --with-mysql --wit h-mcrypt=/usr/local/mcrypt/mcrypt-2.6.4 > make > make install -------------- thatīs it Hopefully that will help you to save some hours deep in the night :-) Does anyone has an advice for the following: I would like to specify the mysql directory ith: --with-mysql=/usr/local/mysql-xxx But then I always get an error message that lmysqlclient files cannot be found. Greetings Klaus