From: "Mike Rondeau" <[EMAIL PROTECTED]> 
Date: Sun, 6 Feb 2005 17:57:17 -0800 
Subject: Newbie Setup Trouble 


Hi :)

 I have just begun study of using PHP, MySQL and
Apache server. Right 
I'm following a book, "PHP and MySQL For Dummies" and
am having trouble 
already. I must be a REAL dummy!

That is where your wrong in my opinion, only dummies
would understand that book, smart people would NOT
understand it.  So your the smart one. :)

 I have installed all 3 programs but 
something is not right somewhere.

Your not a dummy if you know there is something wrong,
somewhere. ;)  (seriously)

 Being so new to this I am having a 
time trying to figure out which program is messed up. 

We all learn and start somewhere. ;)

Certain things 
but others don't.

Reminds me of Windows! ;)

 For instance, my book told me how to make a
phpinfo.php page, which 

Your phpinfo() is working. YAY! 

But it also tells me to create some other pages to
test if PHP 
MySQL are working or not. I followed the scripts
provided exactly but 
getting syntax errors, even though the script is just
what the authors 

Yes depends on PHP version, mysql version to start
with, some are different and also can depend on linux
type/version if things work or not exactly as they are

For instance, it said to make a page and call it
the script for it:

Lets see!

<head><title>Test MySQL</title></head>
<!-- mysql_up.php -->

$sql="show status";
$result = mysql_query($sql);
if ($result == 0)
   echo "<b>Error " . mysql_errno() . ": "
         . mysql_error() . "</b>";
<!-- Table that displays the results -->
<table border="1">
    for ($i = 0; $i < mysql_num_rows($result); $i++) {
      echo "<TR>";
      $row_array = mysql_fetch_row($result);
      for ($j = 0; $j < mysql_num_fields($result);
        echo "<TD>" . $row_array[$j] . "</td>";
      echo "</tr>";
<?php } ?>

But when I open it in my browser I get this error:

Fatal error: Call to undefined function
mysql_connect() in C:\Program 
Files\Apache Group\Apache2\htdocs\mysql_up.php on line

Could anyone of you smart people point me in the right
direction? I'd 
pulling my hair out if I had any left :)

First off is the database name and password created as
the code says?  You need to create the connection to
the database as a username before php can use it.

 I can't make any progress with this study until I
know my 3 programs 
talking to eachother properly, but my book gives no
info on this error.

 Thanks a millionfold for any advice, and I appologise
for the length 
this post.

Mike Rondeau 

That's a starting point..

Search : Creating a User Account

...Reveals how to...

Than Search : Connection String or Creating a
Connection String

...Reveals how to...

Experiment with the site and or and with the search terms above.  If it
relates to database be on mysql site and if it relates
to using php to use mysql look on php site.  

Learn to use the site with the search, instead of us
posting URL's here for you as shortcuts and you not
learning how to use the site I suggest you try the
site and if problems occour mail us. :)

I hope this helps somewhat and points you into the
right direction.


Find local movie times and trailers on Yahoo! Movies.

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to