www.webdeveloper.com
Results 1 to 13 of 13

Thread: MySQL help

  1. #1
    Join Date
    Jan 2007
    Posts
    13

    MySQL help

    I am in a trouble, and i cannot fix the problem. In my php.ini file
    extension=php_ming.dll
    extension=php_mssql.dll
    extension=php_msql.dll
    extension=php_mysql.dll
    are enabled. but when i try to connect to database writing mysql_connect the browser displays the followinf error:Fatal error: Call to undefined function mysql_connect() in D:\server\www\msql.php on line 2. And when i open phpinfo, it doesnt show any mysql information. I use php5 and MySQL 4.1.
    Any help is appreciated

  2. #2
    Join Date
    Jun 2006
    Posts
    472
    what operating system and what server do you have?

  3. #3
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    1,046
    Also can you post your code please/

  4. #4
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    ???
    Quote Originally Posted by Phill Pafford
    Also can you post your code please/
    Quote Originally Posted by mimi83
    Call to undefined function mysql_connect() in D:\server\www\msql.php on line 2.
    Line 1 is presumably:
    PHP Code:
    <?php

  5. #5
    Join Date
    Jan 2007
    Posts
    13
    OS is Windows 2000, Server Apache in one computer, in another Windows XP, Server ISP, the PHP code is as follows:
    <?php
    $con = mysql_connect("localhost","root","");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }if (mysql_query("CREATE DATABASE my_db",$con))
    {
    echo "Database created";
    }
    else
    {
    echo "Error creating database: " . mysql_error();
    }mysql_close($con);
    ?>

  6. #6
    Join Date
    Jun 2006
    Posts
    472
    that pathway to your msql.php doesn't look like it's coming from a server

  7. #7
    Join Date
    Jan 2007
    Posts
    1
    Quote Originally Posted by aussie girl
    that pathway to your msql.php doesn't look like it's coming from a server.....
    Yeah it is true !

  8. #8
    Join Date
    Jan 2007
    Posts
    13
    What does it mean?

  9. #9
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    It means that no one has seen:
    Quote Originally Posted by mimi83
    D:\server\www\msql.php
    in your post. The fact that you received a PHP error message is a good sign. Wherever your script is running, you have, by definition, a PHP-capable server in operation.

    Check your path information in your php.ini and make sure that php_mysql.dll is where it's supposed to be.

  10. #10
    Join Date
    Jan 2007
    Posts
    13
    I reinstalled everything, now i get the following error:

    Warning: mysql_connect() [function.mysql-connect]: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

  11. #11
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    It looks like at least now, you've got mysql running within PHP.

    I'm in over my head at this point. Maybe someone else can help. You may have better (or quicker) luck by posting in the SQL forum.

  12. #12
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    Take a look at: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
    You may see something there that will get you back on track.

  13. #13
    Join Date
    Jan 2007
    Posts
    13
    I solved this problem, namely i was helped. Download Mysql Query Browser, then run Mysql command line client, enter mysql -p, enter password,the
    write set old_passwords=on, try yr php script again it should work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles