SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: mysql_connect()

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I try to use mysql_connect() in a PHP script, I get the following message:
    Fatal error: Call to undefined function: mysql_connect() in C:\HTTPD\HTDOCS\test.php on line 5
    As far as I know, mysql is set up and running. I can get into the mysql program under a DOS prompt and make databases and tables and such. The green light icon is in my taskbar as well, which supposedly means the sql server is up and running.
    Any ideas, anyone? Oh, I'm running win98 if it makes a difference.
    Thanks

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you probably dont have the PHP mySQL module loaded ...

    -------------------
    SitePoint Moderator
    ( my ONLY host ) ( geekarea.org )

    [This message has been edited by Vinay (edited July 23, 2000).]

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You definitely don't have the MySQL PHP module loaded. If you're using version 3.x of PHP under Windows, you'll need to edit your PHP3.ini (in your Windows directory) and uncomment the extension=php_mysql.dll line near the bottom of the file. Remove the semicolon at the start of the line, and make sure there are no spaces or other stray characters on the beginning of the line.

    If this doesn't work, write back and we'll try something else...

    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm such a dope...I edited the local copy of php.ini that was put in my servers (omnihttpd)folder...and not the copy I put in c:\windows...so it was reading the wrong file. Works like a charm now thanks guys.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •