faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 37 people (35%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

php-4.0.3pl1, php-mysql, MySQL-3.23.25 on Redhat 7.0 installed using rpm. I keep getting 'Call to undefined function mysql_connect()'. Why?

Nov 18th, 2000 18:59
G. Peterson,


The php-mysql-4.0.3 binary rpm is linked to
/usr/lib/libmysqlclient.so.9, however, the MySQL-3.23.35-1 binary rpm
installs the library /usr/lib/libmysqlclient.so.10 and thus the mysql.so
module will not load without an error.

You can fix (hack around) this by adding a symbolic link from
libmysqlclient.so.9 to libmysqlclient.so (which should be linked to the
most recent libmysqlclient).

To fix, execute the following command (as root):
  ln -s /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.9