Re: PHP 4.0 Bug #8507 Updated: Can't connect to MySQL 3.22.32

From: Date: Tue, 02 Jan 2001 19:53:50 +0000
Subject: Re: PHP 4.0 Bug #8507 Updated: Can't connect to MySQL 3.22.32
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42648@lists.php.net to get a copy of this message
Hello, also verify that the mysql user can read/write to that socket. Derick On 2 Jan 2001 sniper@php.net wrote: > ID: 8507 > Updated by: sniper > Reported By: info@widg.com > Old-Status: Open > Status: Feedback > Bug Type: MySQL related > Assigned To: > Comments: > > I assume that mysqld is running? > Try reconfigure php to use the installed mysql instead > of the bundled client library. > > 1. Delete config.cache > 2. Use --with-mysql=/path/to/mysql/install/dir > 3. 'make clean ; make depend ; make ; make install' > > Please report back whether this works for you or not. > > --Jani > > Previous Comments: > --------------------------------------------------------------------------- > > [2000-12-31 22:24:38] info@widg.com > I own a Cobalt Raq4 preinstalled with PHP Version 4.0.1pl2 and Chilisoft ASP. Chilisoft ASP > will only work with Mysql 3.22.32. I am unable to connect to my databases using PHP 4.0.1 in MySQL > 3.22.32. phpinfo(); returns Mysql Client API version 3.23.10-alpha. The script I am using is as > follows > > > <?php > //connect > > $connection = > mysql_connect("localhost","user","password") > or die ("Couldn't connect to server."); > > > //select db > > $db = mysql_select_db("database", $connection) or die("Couldn't > select database."); > > //create sql statement > > $sql = "SELECT * (tablename)"; > > //execute sql query and get results > $sql_result = mysql_query($sql) or die("Couldn't execute query."); > > > //results > > > > //format results by row > > > while ($row = mysql_fetch_array($sql_result)) { > $id = $row["id"]; //for every field copy this line and make it for that > row. > > > echo "the contents you want displayed"; > echo "the contents you want displayed"; > > } > > > > //close connection > mysql_free_result($sql_result); > mysql_close($connection); > ?> > > I have filled in all of the correct parameters and I got the following message. The script is > cut from the page and the error message line matches up with the actual page. > > Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket > '/tmp/mysql.sock' (111) in /home/sites/site2/web/info.php on line 5 > Couldn't connect to server. > > Is this a bug or is there a way to make PHP 4.0.1pl2 connect to Mysql 3.22.32. > > Any help would be greatly appreciated > > --------------------------------------------------------------------------- > > > Full Bug description available at: http://bugs.php.net/?id=8507 > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > Derick Rethans --------------------------------------------------------------------- PHP: Scripting the Web - www.php.net - derick@php.net --------------------------------------------------------------------- JDI Media Solutions - www.jdimedia.nl - d.rethans@jdimedia.nl H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands --------------------------------------------------------------------- "God is real, unless declared integer" - Michal Zalewski ---------------------------------------------------------------------

« previous php.dev (#42648) next »