----- Original Message -----
From: "Stephanie Deville" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 29, 2001 22:30
Subject: mysql/php problem


>
> 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";

Hope this isn't your real password and user name.

> $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" );

mysql_query has 1 r.

> $num_rows = mysql_num_rows ( $result );
> print "There are currently $num_rows rows in the table<P>";
> msyq_close( $link );

Again check your spelling.

> phpinfo();
> ?>
> </body>
> </html>

However, you're saying you're not getting any error messages.  Try putting
in a few print statements and see where the code freezes.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to