>On RedHat there's no need to add "-lz" to the linker options, on Debian it
>is (when using the statically libmyslclient.a). Is this a bug somewhere
>in the makefile or anyways, should compress be in the .a lib or is it ought
>to be added manually with -lz?
Use -lz
Read on:
---------
THE PROBLEM/SITUATION: Compiling PHP4 for Apache, either static or APXS,
*with* MySQL capabilities(!), Apache wouldn't start.
ONE EXAMPLE ERROR (when starting Apache):
>Cannot load /usr/local/apache/libexec/libphp4.so into server:
>/usr/local/apache/
>libexec/libphp4.so: undefined symbol: uncompress
>-------------------------------------------------
The other is a libmysqlclient.a error - (as stated in the subject)
THE SOLUTION:
FIRST: MYSQL:
When compiling MySQL (from source - you can't use the binary!) - use the
"--with-lz" option like this:
./configure --prefix=/usr/local/mysql-3.23 --with-mysqld-user=mysql
--with-lz
SECOND: PHP4:
After you do your ./configure... [with any options you want]
After you do your "make"
THEN go find the file in the root of your PHP source folder called:
libphp4.la
Look for the lines that say:
# Libraries that this one depends upon.
dependency_libs='.... [blah blah blah] ... -lmysqlclient'
and ADD to that line, somewhere in that same line, these three characters:
-lz
THIRD: ONE LAST POSSIBLE ERROR:
If you get the error "cannot find libmysqlclient.so.10" on trying to start
Apache:
1. do a "locate" command to find what it's looking for. mine was in
"/usr/local/mysql/lib/mysql"
2. Using a text editor, open "/etc/ld.so.conf".
3. Add the directory in which the problematic file exists. (again:
"/usr/local/mysql/lib/mysql" - without quotes, for me)
4. Save the file. Type "ldconfig".
5. go back to PHP4 compiling again. Where I wrote "SECOND: PHP4" above.
That's it!
It took me 13 hours yesterday to find out why this wasn't working, and I've
successfully installed PHP4 about 20 times in my life. Never had this many
problems. Hopefully this archived message helps someone in the future.
Much thanks to Julie Meloni's webmonkey article for the third big step at:
http://hotwired.lycos.com/webmonkey/00/44/index4a_page4.html
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php