473,545 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php 4.4 not working with mysql 4.1

I recently installed php 4.4.4 using windows binaries on Windows XP Pro. I
also installed MySQL 4.1. I usually use Pear DB but I tried MDB2 and it
worked fine until a client uses a different version so I reverted back to
straigh PHP mysql function calls.

I use this code:
$link = mysql_connect(' localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

And get this error:
Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\ web\client\logi n.php on line 3

Line 3 = $link = mysql_connect(' localhost', 'username', 'password');

This is from the PHP.ini file:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for
it.

Therefore I assumed I didn't have to do anything to get access especially
since MDB2 worked.

Any ideas of what to do?
Nov 5 '06 #1
7 2488
Paul wrote:
I use this code:
$link = mysql_connect(' localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

And get this error:
Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\ web\client\logi n.php on line 3

Line 3 = $link = mysql_connect(' localhost', 'username', 'password');
try with mysqli_connect( ) instead of the mysql_connect()
see http://www.php.net/manual/en/functio...li-connect.php
and www.php.net/manual/en/ref.mysqli.php
//Aho
Nov 5 '06 #2
On Sun, 5 Nov 2006 17:06:59 -0500, "Paul" <lo*@invalid.co mwrote:
>Warning: mysql_connect() [function.mysql-connect]: Client does not support
authenticati on protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\ web\client\logi n.php on line 3
There's even a section in the MySQL manual, which is the first hit on Google
for the error message you posted, for what to do:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

It offers several possibilities, the most advisable of which is to upgrade the
MySQL client that your system is using.

Note that older versions of PHP came bundled with a MySQL 3.2.x client
library, although that (probably) doesn't mean you're forced to use that
specific version.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 5 '06 #3
On Sun, 05 Nov 2006 23:40:13 +0100, "J.O. Aho" <us**@example.n etwrote:
>try with mysqli_connect( ) instead of the mysql_connect()
see http://www.php.net/manual/en/functio...li-connect.php
and www.php.net/manual/en/ref.mysqli.php
Has mysqli been backported to PHP 4, I though it required PHP 5?

If he's getting an error about having a pre-4.1 MySQL client then mysqli won't
run anyway, since it also requires a 4.1.3 or later MySQL client.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 5 '06 #4
Andy Hassall wrote:
>
On Sun, 5 Nov 2006 17:06:59 -0500, "Paul" <lo*@invalid.co mwrote:
Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\ web\client\logi n.php on line 3

There's even a section in the MySQL manual, which is the first hit on Google
for the error message you posted, for what to do:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

It offers several possibilities, the most advisable of which is to upgrade the
MySQL client that your system is using.
The problem is: If he wants to stick with PHP 4.x, he can't. Even the
latest PHP 4.x version uses the old MySQL library for compatibility
reasons.
Note that older versions of PHP came bundled with a MySQL 3.2.x client
library, although that (probably) doesn't mean you're forced to use that
specific version.
In theory you could recompile the latest PHP 4.x version with the latest
MySQL library but I would strongly advise against that. That would make
his scripts work on *his* machine, but nowhere else. As soon as he
uploads them to a provider, a customer he wrote the scripts for, etc.,
they would have the same troubles.

If upgrading to PHP 5 is not desirable, the only reasonable way to deal
with this problem is to use old passwords.

Bye!
Nov 6 '06 #5
Anonymous wrote:
Andy Hassall wrote:
>>On Sun, 5 Nov 2006 17:06:59 -0500, "Paul" <lo*@invalid.co mwrote:

>>>Warning: mysql_connect() [function.mysql-connect]: Client does not support
authenticati on protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\ web\client\logi n.php on line 3

There's even a section in the MySQL manual, which is the first hit on Google
for the error message you posted, for what to do:

http://dev.mysql.com/doc/refman/5.0/en/old-client.html

It offers several possibilities, the most advisable of which is to upgrade the
MySQL client that your system is using.


The problem is: If he wants to stick with PHP 4.x, he can't. Even the
latest PHP 4.x version uses the old MySQL library for compatibility
reasons.

>Note that older versions of PHP came bundled with a MySQL 3.2.x client
library, although that (probably) doesn't mean you're forced to use that
specific version.


In theory you could recompile the latest PHP 4.x version with the latest
MySQL library but I would strongly advise against that. That would make
his scripts work on *his* machine, but nowhere else. As soon as he
uploads them to a provider, a customer he wrote the scripts for, etc.,
they would have the same troubles.

If upgrading to PHP 5 is not desirable, the only reasonable way to deal
with this problem is to use old passwords.

Bye!
Not at all. Unless he's trying to backup the MySQL users database on
one machine and restore it to the other, there should be no problems.
Other than cleaning up some syntax (i.e. JOINS) to make MySQL 5.x more
standards compliant, code written for MySQL 4.x should run on MySQL 5.x.
And code written on MySQL 5.x which doesn't use new features should
run fine on MySQL 4.x (other than the JOIN statements).

The password problem affects ONLY the MySQL users database. And in
general there's no reason to backup that database and restore it on
another machine unless moving an entire system.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Nov 6 '06 #6
"Paul" <lo*@invalid.co mwrote in message
news:_f******** *********@bigne ws6.bellsouth.n et...
>I recently installed php 4.4.4 using windows binaries on Windows XP Pro. I
also installed MySQL 4.1. I usually use Pear DB but I tried MDB2 and it
worked fine until a client uses a different version so I reverted back to
straigh PHP mysql function calls.

I use this code:
$link = mysql_connect(' localhost', 'username', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';

And get this error:
Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL
client in D:\MyDocuments\ web\client\logi n.php on line 3

Line 3 = $link = mysql_connect(' localhost', 'username', 'password');

This is from the PHP.ini file:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for
it.

Therefore I assumed I didn't have to do anything to get access especially
since MDB2 worked.

Any ideas of what to do?
I finally got it working. Several days ago I tried using "UPDATE
mysql.users SET password = OLD_PASSWORD...

And it did not make a difference. I verified the password was chanegd to
the old format.

Yestrday, I tried it again and it worked. Something else must have changed
in the interim. Anyway, I got it working.

Manyt hanks to everyone who replied to my plead for help!
Nov 6 '06 #7
Jerry Stuckle wrote:
The password problem affects ONLY the MySQL users database. And in
general there's no reason to backup that database and restore it on
another machine unless moving an entire system.
Which I did in the past. It's better to keep the data consistent so that
you can move the table without problems.

I stick with my recommendation: If upgrading to PHP 5.x is not possible
or wanted, it's best to use old passowrds.

Bye!
Nov 6 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5422
by: Morten Gulbrandsen | last post by:
Database mysql running on localhost Error The additional Features for working with linked Tables have been deactivated. To find out why click here. -> Database mysql running on localhost PMA Database ... not OK General relation features Disabled
0
1741
by: Lekeas GK | last post by:
Hi All, I am managing a small database and some of the tables need to be strings of an average length of about 2,000 characters. I decided to use the text datatype to store this information knowing that the upper limit is about 65,000 characters.
0
3582
by: Hans Maurer | last post by:
>Description: We're running our current TTS application with MySQL (on Unix). All database, table and column names are in lower-case. However, we need to access this database with a new application which (for some reason) converts all table and column names in its SELECT statements to uppercase. Since MySQL is case-sensitive on Unix, I...
5
2845
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB automatically deletes also all those rows in the child table whose foreign key values are equal to the referenced key value in the parent row. However:
0
3265
by: Robert Mazur | last post by:
MySQL 5.0 alpha (binary install) on Solaris 9 -or- RedHat 8.0 mysql-connector-java-3.0.8-stable ----------------------- Should I expect to be able to connect to MySQL5.0 alpha with JDBC? When trying to connect I am getting: ** BEGIN NESTED EXCEPTION **
5
4161
by: HydroSan | last post by:
Having a bit of a problem getting UPDATE working. The project in question is a simple MySQL VB.NET frontend, allowing Insertion, Selection, and others. Well, I've gotten Drop and Insert working, but to edit a table row, I'd like to use Update. I have the following code in a class: Private Function SQL_CustomerUpdate()
1
2027
by: Paul | last post by:
I recently upgraded from MySQL 3.23 to 4.1. Now db is not working properly. I'd very much like your help in solving this issue! Here's the code I used to test it: require_once 'DB.php'; $db =& DB::connect('mysql://user:password@localhost/dbname'); if (PEAR::isError($db)) { die($db->getMessage());
0
1184
by: beary | last post by:
After months of using mysql, i decided i should have it on my local machine to make testing easier. So I downloaded and installed the latest version from the mysql site (mysql-5.0.37-win32.zip). It went through the installation and also the server configuration with all ticks no crosses. I know the service has definitely started as I've checked...
31
15315
by: ajos | last post by:
hi frnds, i have a form,which has 2 input text boxes, the values are entering the text boxes,when i leave the 2 text boxes blank and hit submit a java script gives the message that the 2 fields are blank.....the problem now is when i leave the text boxes blank the message appears...and when i click ok...then instead of showing me the page its...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.