I am using Red Hat Enterprise Linux Server release 6.5 (Santiago) I faced the below mentioned error:
Fatal error: Call to undefined function mysql_connect() in /var/www-live/muthoot/include/load_config.php on line 10
How can I fix this ?
The problem is most likely caused by MySQL module being disabled in PHP. As mysql
module is deprecated you should use mysqli
or PDO, I would suggest using mysqli_connect()
instead.
To do that, make sure you have php-pdo
and php-mysqli
packages installed and make sure that php.ini
contains this (for PDO):
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
Or this (for mysqli):
extension=mysqli.so
Check the php.ini to see if the mysql extension is actived. If not, install it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.