Click to See Complete Forum and Search --> : Recompiling PHP to support MySQL under Redhat 7.3


Dunn
10-05-2002, 01:13 PM
I have downloaded and installed all MySQL RPM packages. Every attempt to re-configure PHP with:

./configure --with-mysql=/some/dir/wrong/again

Turns up either:

configure: error: Cannot find header files under /usr/lib/mysql/

or

configure: error: Cannot find mysqlclient library under /usr/src/redhat/SOURCES/mysql-3.23.52

... depending on what path I use as the parameter for --with-mysql.


I downloaded the MySQL source code, untarred it, read the docs, compiled and installed it. It seems as though MySQL places its files in many places on the system:

/usr/lib
/usr/share/mysql
/usr/include/mysql
/var/lib/mysql
/usr/bin/mysql


There are many paths. Sources in one, libraries in another, executables in a third, datafiles in a fourth. This would not bother me except that PHP only accepts ONE directory for --with-mysql configuration option.

Thanks for any tips

Dutch Mafia-boy.
10-06-2002, 05:23 PM
I'm in the exact same situation......I was geeting the same error yesterday.,....and trying all the exact same path you were....heck..your post is almost identical to mine and what I said.....

anyways, tips I got yesterday was to make sure "php-devel" rpm is installed..its on the RedHat 7.3 cd's.....it will then put the header files in /usr/include.....

I then tried ./configure --with-mysql=/usr/include.....thinking that would fix the problem since I was pointing it right to the files...BUT I STILL GOT THE SAME ERROR!! I couldn't believe it.....

Out of frustration & unbelief, I just tried ./configure --with-mysql without mapping it to a path......and IT WORKED!!.....without any error....

I didn't get the final confirmation to indeed see if MySQL support was loaded into PHP b/c I didn't run "make" and "make install" I now realize I forgot to do that because when I tried to view the test.php page, PHP wasn't working, so just code appeared on the page...its Sunday today, so I'll continue my quest tommorrow.

Keep me in touch how it goes....we can do this together!!

Dunn
10-07-2002, 03:44 PM
I had to compile and install MySQL with --prefix=/some/dir

This `configure' option places everything the compile creates under /some/dir

From there, `configure' for the PHP project can use the command --with-mysql=/some/dir and everything worked peachy.

There are details I am sure to be forgetting as this all occurred around 4am the other night.

Dutch Mafia-boy.
10-08-2002, 01:05 AM
so you installed MySQL by source....not by RPM ??

meaning you did a "make" and "make install"??

peeps_59
10-11-2002, 08:39 AM
I was going through the same problems about two months ago. Try the NHF!!

http://www.linuxnewbie.org/nhf/Webservers/PHP_and_Apache_Intro.html

It worked great for me (I was using newer versions of PHP and Apache, but you just make minor changes)...


Hope this helps.

denny