Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2004, 08:20 AM
Authorized User
 
Join Date: Apr 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default php help pleaseeeee!!!!!!!!!!!!!

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(); ?> .

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.

 
Old November 11th, 2004, 11:56 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Use the google, terry_s.

Search for that error, it brings up lots of results.

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 12th, 2004, 06:55 AM
Authorized User
 
Join Date: Oct 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default

the "proper" mysql interFACE in PHP5 is actually "one of those bundle packages", so I'm afraid you've no choice. Read the PHP5 manual for more info.

Many shoes,

James/SiliconFuRy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Beg. PHP 5 > Ch. 11 - fetch_field.php crater BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 January 2nd, 2007 12:20 PM
PHP Warning: PHP Startup: Unable to load dynamic l surendran Beginning PHP 1 May 29th, 2006 08:49 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
Error: movie.php & commit.php on p182-186, ch6 willburke BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 October 12th, 2004 02:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.