List:General Discussion« Previous MessageNext Message »
From:Stephanie Deville Date:May 29 2001 4:30pm
Subject:mysql/php problem
View as plain text  
I'm running FreeBSD 3.4, Apache 1.3.9 w/ php4 and mysql 3.22.32.   The
problem I'm having is that my php scripts work fine, mysql works fine.  When
I run a php script, everthing in the script works up to the point were I try
mysql_connect.  I get no error, but the script just hangs.   It never
connects to the database.  I've looked through all my logs, and there are no
errors listed anywhere.   Any ideas? 

Here is the code I'm testing all this with:

<html>
<head> 
<title> My php test script </title> 
</head> 
<body> 
<?php 
$user = "root"; 
$pass = "Taylor"; 
$db = "CollegeBound"; 
$link = mysql_connect( "localhost", $user, $pass ); 
if ( ! $link ) 
	die( "Couldn't connect to MySQL" ); 
mysql_select_db ( $db, $link ) 
	or die ( "Couldn't open $db: ".mysql_error() ); 
$result = mysql_querry( "SELECT * FROM Address" ); 
$num_rows = mysql_num_rows ( $result ); 
print "There are currently $num_rows rows in the table<P>"; 
msyq_close( $link ); 
phpinfo(); 
?> 
</body> 
</html> 



JUMP Technology Services
Stephanie DeVille
Systems Engineer
918.317.1256 (w)
918.625.6106 (c)

Thread
mysql/php problemStephanie Deville29 May
  • Re: mysql/php problemRolf Hopkins30 May