Its very likely that he has installed the latest versions of mysql and php and is using the incorrect library to try and make it go...change to the latest mysqli librabry and try again


From: Stefan Reimers <[EMAIL PROTECTED]>
Subject: [PHP-DB] Re: Newbie Setup Trouble
Date: Mon, 07 Feb 2005 16:17:45 +0100


first of all, the fatal error indicates that the mysql extension is missing or just disabled. To find out what's wrong check for the file php_mysql.(so|dll) [using *nix|Windows] in the php-extension directory. If present, then open the php.ini file and search for the string extension=php_mysql.... and delete the ; in front of it, if present. Stop and start webserver and try again.

Alternatively you should install XAMPP or similar which installs Apache, PHP and MySQL at once. This makes life easier for beginners.


Mike Rondeau wrote:

I have just begun study of using PHP, MySQL and Apache server. Right now I'm following a book, "PHP and MySQL For Dummies" and am having trouble already. I must be a REAL dummy! I have installed all 3 programs but something is not right somewhere. Being so new to this I am having a real time trying to figure out which program is messed up. Certain things work, but others don't.

For instance, my book told me how to make a phpinfo.php page, which works fine. But it also tells me to create some other pages to test if PHP and MySQL are working or not. I followed the scripts provided exactly but keep getting syntax errors, even though the script is just what the authors wrote. For instance, it said to make a page and call it mysql_up.php. Here's the script for it:

<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); $j++)
        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 10

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

I can't make any progress with this study until I know my 3 programs are 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 of this post.

Mike Rondeau

-- PHP Database Mailing List ( To unsubscribe, visit:

-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to