Help: Cannot mysql_pconnect

From: Date: Tue, 23 Feb 1999 04:09:14 +0000
Subject: Help: Cannot mysql_pconnect
Groups: php.dev 
Request: Send a blank email to php-dev+get-4258@lists.php.net to get a copy of this message
mysql works great by itself even from xmysql. php3 works great by itself. However I cannot get mysql to work from php. I am using the example guestbook database found on the web and the 'first' mysql_ line fails. Where do I begin debugging ? Any ideas how to solve the problem ? Please help. Thanks in advance. I.B. ibandyop@hotmail.com Problem: ----------- Warning: Can't connect to local MySQL server (2) in /usr/local/apache/htdocs/gb/gb.php3 on line 60 Unable to connect to SQL server Code at line 60: --------------------- 55: /* First let's set some variables. */ 56: $hostname = "localhost"; 57: $password = ""; 58: $user = "root"; 59: 60: /* Establish our connection to the DB. */ 61: mysql_pconnect($hosthame,$user,$password) or die("Unable to connect to SQL server"); 62: mysql_select_db("ContactDB") or die("Unable to select database"); PHP/MySQL information --------------------- phpinfo() - returns this about mysql Allow persistentlinks: Yes Persistent links: 0/Unlimited Total links: 0/Unlimited Client API version: 3.22.16a-gamma Compilation definitions: MYSQL_INCLUDE=-I/usr/local/include/mysql MYSQL_LFLAGS=-Wl,-rpath,/usr/local/lib/mysql -L/usr/local/lib/mysql MYSQL_LIBS=-lmysqlclient Platform -------- Linux Version: 5.2 Apache Version: 1.3.4 PHP Version: 3.0.6 mysql Version: 3.22.16a-gamma -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4258) next »