Hi,
I want to use PHP that is pre-installed in Redhat Linux 8.0 to connect MySQL 3.23. However, it shows an error and have no response repectively.
Situation 1:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
<?php
$db = mysql_pconnect()
or die("Error: Could not connect to the database.");
echo "Finish testing connection.";
?>
</body>
</html>
I got the following result from the returned PHP page:
Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/public_html/temp/insertAction.php on line 8
Situation 2:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
<?php
@ $db = mysql_pconnect();
if (!$db) {
echo "Error: Could not connect to the database.";
exit;
} else
echo "Connect to the database successfully";
echo "Finish testing connection.";
?>
</body>
</html>
I got the following result from the returned PHP page:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body>
I have tried to install "php-4.2.2-8.0.5.src.rpm" which is downloaded from (http://www.redhat.com/swr/i386/php-mysql-4.2.2-8.0.5.i386.html). However, I have tried to install it and got the following error message:
Shell > rpm -i php-4.2.2-8.0.5.src.rpm
warning: php-4.2.2-8.0.5.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Could anyone suggest me to solve the problem? Welcome to Email me at: carrotmail1220@yahoo.com.hk.
Regards,
Bruce