installing php with mysql support ?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
arnout
Forum Newbie
Posts: 2
Joined: Tue Aug 06, 2002 9:01 am
Location: AMSTERDAM / NETHERLANDS

installing php with mysql support ?

Post 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 ?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

maybe the path to mysql is where you installed it ..?
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
arnout
Forum Newbie
Posts: 2
Joined: Tue Aug 06, 2002 9:01 am
Location: AMSTERDAM / NETHERLANDS

PHP is working, with MySQL-support !!

Post 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.
Post Reply