473,395 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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\login.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 2480
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\login.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.comwrote:
>Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\web\client\login.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.uk :: 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.netwrote:
>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.uk :: 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.comwrote:
Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\web\client\login.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.comwrote:

>>>Warning: mysql_connect() [function.mysql-connect]: Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in D:\MyDocuments\web\client\login.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*******@attglobal.net
==================
Nov 6 '06 #6
"Paul" <lo*@invalid.comwrote in message
news:_f*****************@bignews6.bellsouth.net...
>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\login.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
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 ...
0
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...
0
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...
5
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...
0
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?...
5
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,...
1
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...
0
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...
31
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.