List:MySQL on Win32« Previous MessageNext Message »
From:Randy Clamons Date:September 22 2004 8:37pm
Subject:Re: undefined function mysql_connect()
View as plain text  
May,

This may not be the right list for your question, as it pertains more to php than mySql.
PHP 5.0 does not automatically load mySql libraries, so the mySql functions are not
available unless you make some changes in the php.ini file. I was looking at the stuff
yesterday the the PHP documentation site -- http://www.php.net/manual/en/. It's probably
better that you read the stuff yourself than if I try to recap what I remember about it.
(I'm still using an older version of PHP).

When reading the PHP docs, be sure you look over the new functions (mysqli_). Looks like
you might need to use them, depending on specifics of your project.

Randy Clamons
Systems Programming
Astro-auction.com


> ------------Original Message------------
> From: Catapult Webmaster <project_catapult@stripped>
> To: win32@stripped
> Date: Wed, Sep-22-2004 7:52 AM
> Subject: undefined function mysql_connect()
>
> hi!
>  
> i would just like to ask if i have missed anything in the installation 
> (e.g. configuration for MySQL connectivity) because the ff. piece of 
> code always returns "Fatal error: Call to undefined function 
> mysql_connect() in F:\xitami\catapult\index.php on line 13."
>  
> This is the part of my code that's causing the error (the whole file is 
> saved as test.php):
> <?php
> $user = "";
> $pswd = "";
> $link = mysql_connect("localhost", $user, $pswd);
> if (! $link)
>  die("Could not connect to MySQL.");
> print "Successfully connected to the server.<br>";
> mysql_close($link);
> ?>
>  
> Quick info on my current environment:
> OS: Win XP SP1, MySQL ver 4.0.20d, PHP 5.0.1, Xitami 2.5b4
>  
> However, I would like to inform you that the ff. works (saved as 
> php_set.php):
> <?php
>     phpinfo();
> ?>
> ... as well as connecting to MySQL through the command prompt (i am 
> able to create/update/select databases)...
>  
> thanks very much for all the help.
>  
> regards,
> may
> 

Thread
HELP with "INSERT SELECT"Daniel Bronzeri Barbosa22 Sep
  • Re: HELP with "INSERT SELECT"SGreen22 Sep
    • RE: HELP with "INSERT SELECT"Jordan Sparks22 Sep
      • undefined function mysql_connect()Catapult Webmaster22 Sep
        • Re: undefined function mysql_connect()Randy Clamons22 Sep
          • Unable to edit rows in Query BrowserMichael Crowl22 Sep
            • Re: Unable to edit rows in Query BrowserRandy Clamons22 Sep
              • Re: Unable to edit rows in Query BrowserMichael Crowl22 Sep
RE: HELP with "INSERT SELECT"Hernando Patino22 Sep
  • Re: [BRMA-ALTO-RISCO] RE: HELP with "INSERT SELECT"Daniel Bronzeri Barbosa22 Sep