php - MySQL Connection

Post everything else here

Moderators: Website/Forum Admins, Other/Off Topic Moderators

rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

php - MySQL Connection

Postby rf » Mon Apr 24, 2006 1:52 am

The php script:
mysql_connect()

When run:
mysql_connect($host,$user,$password);

results in this error:
Fatal error: Call to undefined function: mysql_connect() in /var/www/mysql_up.php on line 10

php4 was compiled with mysql=Dir

php -v returns:
PHP 4.3.10-9 (cli) (built: Mar 6 2005 17:45:14)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

apache -v
Server version: Apache/1.3.33 (Debian GNU/Linux)
Server built: Feb 8 2005 03:32:49

Your MySQL connection id is 3 to server version: 5.0.20-pro-gpl

:) Why "Fatal error: Call to undefined function: mysql_connect()" ?

Installing MySQL++-2.1.1 did not make any difference.

Thanks :D

RF
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Mon May 01, 2006 1:08 am

Follow up:

Two things fixed the "Call to undefined function: mysql_connect() in /var/www/mysql_up.php on line 10" error:

1. adding php-mysql package from Xandros Network.
2. editing /etc/php4/apache/php.ini adding to section [mysqld]
mysql_default_socket = /tmp/mysql.sock

This may help someone as it helped me.
:D

rf

Who is online

Users browsing this forum: No registered users and 6 guests