|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Fatal error: Call to undefined function: mysql_connect()
definite newbie with setting up servers. Techies have set me up with a dedicated linux (Redhat 8) with mysql and php already installed.
when running my php file which on the 2nd line tries to connect to the database I get the following: Fatal error: Call to undefined function: mysql_connect() Line I'm using: $db = mysql_connect("localhost", "uname", "pword"); I have created the uname user successfully in the mysql/user table so it's not that. I've read through some of the other posts and had no luck, please suggest something. I have a feeling it's a pretty easy fix but don't have a clue what to try. Perhaps it's permissions or a missing line in the php.ini file thx for any help. |
|
#2
|
|||
|
|||
|
This means you don't have mysql support enabled in PHP. You will need to add MySQL support to PHP, most likely thru an rpm since you are using redhat 8.
Easiest way would be to complain to the techies that set you up, since they didn't do it fully. Otherwise you need to find the rpm and install it yourself. Should be called something like PHP-mysql-version.rpm |
|
#3
|
|||
|
|||
|
When you say 'find the rpm' are you thinking it exists on the server already, just needs to be installed? Or do you mean get it from somewhere?
I did the command 'locate .rpm' which returned only 2 files: /etc/postfix/main.cf.rpmnew /root/up2date-3.0.7.2-1.i386.rpm There are a bunch of gz files on the server: mysqlaccess.1.gz mysql.1.gz mysql_zap.1.gz mysqld_multi.1.gz mysqladmin.1.gz mysqld.1.gz safe_mysqld.1.gz mysqldump.1.gz mysqlshow.1.gz Bundle: BD::mysql.3pm.gzDBD::mysql::INSTALL.3pm.gz DBD::mysql.3pm.gz mysql.info.gz Anyway, would love to know where to find the right rpm to install and how to do it, thanks so much for instructions. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Fatal error: Call to undefined function: mysql_connect() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|