Hi!
I use CentOS 4.4, apache 2.0.52 webserver, php 4.3.9, mysql 4.1.
I have instaled mysql. If I type the command :
Code:
rpm -qa | grep mysql
It gives me:
Code:
mysql-server-4.1.20-1.RHEL4.1
mysql-devel-4.1.20-1.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1
mysql-4.1.20-1.RHEL4.1
libdbi-dbd-mysql-0.6.5-10.RHEL4.1
Everithing seems to work fine except mysql. My website (pure php) is already on the apache and work.
For example if I open a page with the content (php info page) :
The server gives me the php info page (
http://www.coka.co.yu/proba.php).
But if I want to connect to mysql database, it gives me error.
For example:
Code:
mysql_connect("localhost", "username", "password")
or die("Error" . mysql_error());
mysql_select_db("database")
or die("Error" . mysql_error());
$result=mysql_query("SELECT * FROM table where Name='$name' order by datum DESC") or die("Error:" . mysql_error());
$rekord = mysql_fetch_object($result);
echo $record->Column_name;
The error is:
Code:
Fatal error: Call to undefined function: mysql_connect()
in /var/www/html/proba.php on line 4
If I try to connect to mysql database with wrong password, the result is the same.
On the server side mysqld is runing, the database is opened and the mysql port is open.
Can somebody help me?