LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   php and mysql installed but php is not able to get mysql... (https://www.linuxquestions.org/questions/linux-software-2/php-and-mysql-installed-but-php-is-not-able-to-get-mysql-769871/)

lalwani 11-18-2009 02:28 AM

php and mysql installed but php is not able to get mysql...
 
Hi All
I'm running PHP Version 5.1.6 and mysql version 5.0.86 on FC6.
Both are running fine individually.
but when I use mysql_connect() in php i get following error:
Fatal error: Call to undefined function mysql_connect() in /usr/local/myfiles/share/test.php on line 30

phpinfo() shown that php is installed without mysql--
.........'--without-mysql' '--without-gd' '--without-odbc' '..........

But I don't want to reinstall php using yum or rpm as The server is being used for Nagios and any crash or any loss will spoil the scene.

The only affordable solution that I come to know is to have these two files:
mysql.so
mysqli.so
and specify it in php.in with extension_dir.Just one entry in httd.conf and restart apache.
But I'm not sure How to go for this.
Help me about these share objects files and the proper entry to be made in httpd.conf.

Thanks in advance.
Mukesh Lalwani

bathory 11-18-2009 02:43 AM

Hi,

You need the php-mysql package in order for php to work with mysql

Regards


All times are GMT -5. The time now is 03:33 PM.