I am running php 5.4.16 on a rhel 7.9 webserver (httpd 2.4.6).
When doing phpinfo(), there is no mysql section.
Php pages that require a connection to the mysql database are giving error 500.
Example page is a simple attempt at connection, it is giving HTTP 500.
<?php require_once('../Connections/connMySQL.php'); ?>
<html>
<body>
<h1>Hello World</h1>
</body>
</html>
The server has the following mysql packages installed:
yum list | grep mysql
mysql-community-client.x86_64 5.7.41-1.el7
mysql-community-common.x86_64 5.7.41-1.el7
mysql-community-libs.x86_64 5.7.41-1.el7
mysql-community-libs-compat.x86_64 5.7.41-1.el7
mysql-community-server.x86_64 5.7.41-1.el7
When using php -m, it gives me a list of modules:
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zip
zlib
[Zend Modules]
The mysql daemon is also running
systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2023-02-15 09:51:13 MST; 3h 3min ago
I also have enabled display_errors = On in php.ini
Its giving the following error:
Call to undefined function mysql_pconnect() in /var/www/html/...
Does the above means mysql is not configured on the server? How should I go about in configuring php if yes?