NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
MySQL/PHPEd Connectivity Problem *solved*


Joined: 06 Jun 2006
Posts: 5
Reply with quote
Hello all,

My first post.

I have just installed PHPEd on my two development machines (one at home other at office). In both cases PHPEd is v4.5.1 (4524).

Both my machines have Wampserver running. This Wampserver is running fine and there has never been a problem with MySQL (5.0.21-community-nt).

When I try to run this code (CreateTable.php);

Code:

 1<?php
 2   $user="test";
 3   $password="test";
 4   $database="testPHP";
 5    mysql_connect(localhost,$user,$password);
 6    @mysql_select_db($database) or die( "Unable to select database");
 7    $query="CREATE TABLE contacts (id int(6) NOT NULL auto_increment,first varchar(15) NOT NULL,last varchar(15) NOT NULL,phone varchar(20) NOT NULL,mobile varchar(20) NOT NULL,fax varchar(20) NOT NULL,email varchar(30) NOT NULL,web varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
 8    mysql_query($query);
 9    mysql_close();
10?>


I get an error that says

Quote:
SQLConnect: Client does not support Authentication protocol requested by server; consider upgrading MySQL client at CreateTable.php line 5

OK, bit of problem solving, I removed the password from the test account, ran it again and it was fine.

It is something to do with the password authentication. Any ideas would be appreciated.

Kind Regards
Tony Benci
View user's profileFind all posts by tbenciSend private message
Answered my own question


Joined: 06 Jun 2006
Posts: 5
Reply with quote
Me Again

Don't you just hate it when you post a question and then find the answer.

No matter how long I dredge forums, the moment I ask the question the answer is seen Confused

OK, it was because I had V4.0 of PHP as default. As soon as I reinstalled with V5.0 as the PHP default it worked fine.

Then I thought, "OK, if this is a v4 v5 issues. Rather than re-install, just declare the file as v5 (php5)."

I loaded it as a V5 file (on my other machine that I hadn't reinstalled) and it worked fine.

This begs the question. What happens with v4?

Or more importantly, if we want to treat a file as V4, how do we configure PHPEd to run v4 with MySQL?

Great product btw, it is fantastic to be treating PHP as a series development tool (such is the value of symbolic run-time debugging, you just don't know how much you use it until you don't have it).
View user's profileFind all posts by tbenciSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
There are couple of question and almost all are not related to PhpED IDE.
Well, let me answer them one by one.

Quote:
It is something to do with the password authentication

No. It's libmysql.dll that was rejected by mysql server.

Quote:
OK, it was because I had V4.0 of PHP as default. As soon as I reinstalled with V5.0 as the PHP default it worked fine

"default" means which one PHP4 or PHP5 is associated with .php file extension in Tools->Settings->Association.
Nothing more. Just correct the entries and you'll be all set.

Quote:
This begs the question. What happens with v4?

Probably you'd post this question to php.general or better php.internal. They ship PHP, not we Smile

Quote:
Or more importantly, if we want to treat a file as V4, how do we configure PHPEd to run v4 with MySQL?

IDE itself works pretty god with MySQL v3, v4 and v5 if you update library in "phped" directory. Sorry we can't do it for you because of licensing problems created by MySQL AB.

Quote:
Great product btw, it is fantastic to be treating PHP

Thanks Smile


Hope my answers made things a bit clearer.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Jun 2006
Posts: 5
Reply with quote
ddmitrie wrote:
There are couple of question and almost all are not related to PhpED IDE.
Well, let me answer them one by one.
..
..
Hope my answers made things a bit clearer.


Hi Dmitrie,

Yep absolutely clear. I have been programming for a long time (I can still remember CB80 Fortran etc). Anyway, I knew PHP was worth looking at but was never going to leave my Borland Studio for a language I couldn't run-time debug.

This product is great and it has given me PHP as a serious tool in the old toolbox. You know, my Borland Studio (if you were to include all upgrades and purchases since Turbo Pascal V1.0) has cost me over $20K. I never fail to be amased at the low cost of all this. Thank you Nusphere.

Regards
Tony
View user's profileFind all posts by tbenciSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Hi Tony,
I didn't know that anything were provided for public before Turbo Pascal version 3.0 Smile
But since that I used them all, including tc and bc branches. Yet they recently stopped.
oops, this talk is going beyound the forum subject.
With PHP, it's not that simple as with strong-prototyped languages like Pascal or C. Many things are "decided" in run-time. It adds power and simultaneously makes this language weaker. Sometimes it's just impossible to find a reason for failure without a good debugger. That's why I wrote DBG for php 3.0.9 and then ported to 4.0.0.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Jun 2006
Posts: 5
Reply with quote
ddmitrie wrote:
Hi Tony,
I didn't know that anything were provided for public before Turbo Pascal version 3.0 Smile
But since that I used them all, including tc and bc branches. Yet they recently stopped.
oops, this talk is going beyound the forum subject.
With PHP, it's not that simple as with strong-prototyped languages like Pascal or C. Many things are "decided" in run-time. It adds power and simultaneously makes this language weaker. Sometimes it's just impossible to find a reason for failure without a good debugger. That's why I wrote DBG for php 3.0.9 and then ported to 4.0.0.


Hi Dmitrie,

Yep, Turbo Pascal 1. It had a cartoon of Frank Borland riding a Donkey on the user manual and was distributed with a 5 1/2 disk. In my museum I have V1.0 Serial Number 456 (never been opened) and Borland DB Toolbox. TP1 was $49.95 and the DB Tools $29.95.

They were incredible in their day when you consider DR's CB80 license was $2,500.

I agree 100% with your comments regarding PHP, the reason I never committed to a "free-ware" client/server language was the lack of debugging. When you write code for a living you just can't go on excursions to find problems.

There are two axioms for we programmers;

1. "There is always one more bug"; and,
2. "You can't prove there aren't bugs; only that there are".

I have been seriously using PHP now for three days and have already gotten a user log-in/verification site working with a GPS plotting and Goggle mapping sub-system. Without PHPEd, I wouldn't have tried to use PHP.

Regards
Tony
View user's profileFind all posts by tbenciSend private message
Getting back to the subject...


Joined: 31 Oct 2006
Posts: 3
Reply with quote
Getting back to the subject...

I have the same problem with PHPEd 4.6.1.

"Client does not support authentication protocol requested by server; consider upgrading MySQL client in"

PHP5 works fine.
PHP4 cannot connect to mySQL Database.
As pointed out in another topic, I visited http://dev.mysql.com/downloads/connector/php/ , but Connectors for mySQL are only available for PHP5, not PHP4.
My providers server is still on PHP 4.3, so PHP5 is not an option for me.

Can someone post step-by-step instructions of how to make PHP4 work with mySQL in PHPEd 4.6.1?
View user's profileFind all posts by ben_atSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
well,
standard php 4.3 binaries available from php.net are compiled with mysql 3.x and therefore do not support mysql authentication protocol the server uses starting with version 4.1. As you may see, PHP Debugger has nothing to do with this Smile. It's up to built in mysql extension and nothing else.
I'd recommend you to try out our TechPlatform, though. It comes with php and Apache and most probably works good with mysql.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 31 Oct 2006
Posts: 3
Reply with quote
First of all thanks for your fast replies.

However, I don't quite understand you...

Isn't the PHP Debugger using the PHP bundled with PHPEd in C:\Program Files\nusphere\phped\php?
How does the TechPlatform help an error I get from PHPEd when I press run (or debug)?

I am lost.
View user's profileFind all posts by ben_atSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
PHP Debugger can use local Apache too. All you need is RunMode set to 3rd party web server in the project properties.
Regarding the error message, you get it from php, not from debugger. Debugger does show it to you. Nothing more Smile
If you run that script without IDE you'll get exactly the same error (if errors are enabled in php.ini).
TechPlatform comes with php compiled by our engineers and probably it's more mysql 4.1 friendly Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Solved!


Joined: 31 Oct 2006
Posts: 3
Reply with quote
Solved!

Indeed, after downloading and installing Techplattform, changing DocumentRoot in httpd.conf to the desired local directory, rebooting Apache and setting the Runmode it finally works!
Took me some time to figure all that out.

Thank you dmitri for the quick help!
Ben
View user's profileFind all posts by ben_atSend private message
MySQL/PHPEd Connectivity Problem *solved*
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic