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

    Join Date
    Oct 2000
    Posts
    1
    Rep Power
    0
    I installed php4 and mysql on my linux box. I ran a simple "phpinfo()"-script, and it worked just fine. The phpinfo gives me the following info:
    MySQL Support - enabled
    Active Persistent Links - 0
    Active Links - 0
    Client API version - 3.23.10-alpha
    mysql_include -
    mysql_lflags -
    mysql_libs -

    Then I try using php to connect simply to my mySQL server which is working fine:

    mysql_connect(127.0.0.1, root, sql);

    However, I get the following error in my browser:
    Parse error: parse error in /home/httpd/file.php on line 5

    I assume that is because php doesn't have a clue what 'mysql_connect' means. I don't know how to 'teach' php that syntax or where to look it up. I'm suspecting it has something to do with the 3 empty:
    mysql_include -
    mysql_lflags -
    mysql_libs -
    lines in my phpinfo() result, which should probably point to some directory. Can anyone help me? I'd really appreciate it.
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    No, it means you did something wrong. You need quotes around the arguments to the function.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    13
    Rep Power
    0
    The fact that you got a PHP error means that PHP is working, have a look at your code

    Paul
  6. #4
  7. chown python:users\ /world
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Texas Tech
    Posts
    95
    Rep Power
    15
    Your code should look like this = mysql_connect("localhost","username","password");

    ------------------
    Hartmann

IMN logo majestic logo threadwatch logo seochat tools logo