Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php help pleaseeeee!!!!!!!!!!!!!

Options
  • 11-11-2004 12:27pm
    #1
    Closed Accounts Posts: 13


    Hi all very frustrated at the mo and feel like giving up all togetether.

    i am totally new to developing in php and have recently started to learn it . i find the language easy enough but configuring it to run on my machine a nightmare.

    im using iis5 on win xp pro.
    have installed mySql 4.1 .exe basically just clicked on the exe and it installed itself. have created a database in it no probs what so ever works fine.

    i downloaded the php .exe and installed that too no probs at all.
    have modified the php.ini and placed this in it.
    cgi.force_redirect = 0
    cgi.redirect_status_env = ENV_VAR_NAME

    i also set the path to the extensions and enabled the php_msql.dll


    and when i tested a page it works fine .

    example <? phpinfo(); ?> :D .

    but when i try anything like connecting to mysql i get the following error.

    "Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\php\connect2.php on line 5
    A connection to the server could not be established"

    code used :

    <?php
    $hostname = ""; // have plave loaclhost here too and the machine name etc.
    $username = "root";
    $password = "secret";
    $connection = mysql_connect($hostname, $username, $password);
    if (!$connection) {
    die("A connection to the server could not be established");
    } else {
    echo "User $username is logged onto the MySQL server, $hostname, successfully";
    }
    mysql_close($connection);
    ?>

    i dont really want to use one of those bundle packages as i want to use the proper mysql interface etc.

    can anyone tell me where im going wrong .
    any help greatly appreciated. :confused:


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    MySQL 4.1 uses a different authentication method to older versions, so the client in your version of PHP is probably outdated. Did you get the most recent version of PHP? If so you should probably download a version of MySQL < 4.1, or better, get one of the all-in-one installers like PHPTriad, as discussed here a couple days ago.

    BTW, please don't use titles like that, they give very little incentive to click. Something descriptive like "PHP/MySQL authentication problems" has a much better chance of response. The exclamation marks are particularly annoying.

    adam


  • Closed Accounts Posts: 13 ter


    installed php5


  • Closed Accounts Posts: 3,859 ✭✭✭logic1




Advertisement