Page 1 of 1

installing php with mysql support ?

Posted: Tue Aug 06, 2002 9:01 am
by arnout
I have installed php 4.2.2 and mysql 4.0.2-2 (rpm) on a Red Hat 7.3 machine.
I have a problem with installing php, including mysql-support.

I read that you have to specify the path to mysql in the configure line :

./configure --with-mysql=/path/to/mysql

but, what exactly is the path to mysql ?

I know that mysql-support is not installed at the moment, because I get
an error when connecting to the database via a php script, telling me that
mysql-support is not installed.

any suggestions ?

Posted: Tue Aug 06, 2002 9:52 am
by hob_goblin
maybe the path to mysql is where you installed it ..?

Posted: Tue Aug 06, 2002 10:05 am
by llimllib
I think I did a default install on FreeBSD 4.4 and it installed to /usr/local/mysql-version.number. It's likely that it's in a similar place on your computer, but where the red hat rpms put it is beyond me. try this:

Code: Select all

find / -name "mysql*" -print
It should print out any directory or file that starts with the word mysql. Keep in mind, I'm no Unix expert, but this should help.

Posted: Tue Aug 06, 2002 1:47 pm
by volka
if unsure try
./configure --with-mysql
without any path.
if it works, nice and done :D

it's looking for libmysqlclient.so and the mysql-includefiles.

cann't remember completely what I've done when I compiled mysql from source and php against it but I think it was
  • include-files were in /usr/include/mysql
  • libs in /usr/lib
  • called configure with --with-mysql=/usr (or /usr/include or /usr/include/mysql ? )
  • called make with $LDFLAGS=-L/usr/lib

PHP is working, with MySQL-support !!

Posted: Fri Aug 09, 2002 6:24 am
by arnout
okay, thanks for the support guys. I now have PHP working with MySQL-support !!

I tried installing RedHat 7.3 without any database or webserver, and installed Apache, MySQL and PHP later, but somehow, it never worked. Probably because I am not a Linux-whizzkid (yet...).

But my solution is simple :

Download Mandrake 9_0 beta, because it comes with standard support for mysql and php. Great stuff.

Finally I can start learning PHP together wit MySQL.