#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    4
    Rep Power
    0
    When I try to execute the following php code to connect to my database using php 4.0

    <?php

    $conn = mysql_connect("localhost", "root","");
    mysql_select_db("test");
    if(my_sql_errno()) {
    echo mysql_errno().": ".mysql_error()."n";
    exit;
    }
    mysql_close($conn);
    ?>

    I get the following error meesages
    "Fatal error: Call to undefined function: mysql_connect() in C:Inetpubwwwroottest.php on line 10"

    MySQl works perfectly on commandline but does not work from within my code. I have uncommented mysql's dll in my php.ini.
    Could someone help .
    How do I make PHP work with mysql? Can someone help.

    Patrick
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    Well I see your point I have the same error msgs. I find out that PHP4 don't work with mysql on WinNT... (see http://www.php.net ) Well the PHP4 RC1 works. But now I'm using RedHat as little homeserver, there you don't have this problems
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    thane
    Posts
    50
    Rep Power
    0
    i couldn't install apache on win95 yaar

    apache is showing running but when i open my browser with localhost .

    it is giving me error as browser sent malformed request ..

    can u pls tell me remedy for this

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 06:02 PM
  2. Check MySQL Version thru PHP
    By wolftrap1 in forum PHP Development
    Replies: 2
    Last Post: February 11th, 2004, 08:51 PM
  3. PHP and IIS on NT4
    By trhaynes in forum Beginner Programming
    Replies: 6
    Last Post: February 11th, 2004, 06:33 PM
  4. Replies: 0
    Last Post: February 10th, 2004, 11:44 PM
  5. Replies: 0
    Last Post: January 30th, 2004, 01:22 PM

IMN logo majestic logo threadwatch logo seochat tools logo