PHP mysql_connect

2006-06-23 Thread Jørn Dahl-Stamnes
I got a strange problem. I run a test-webserver and a MySQL server on the same machine. The code to connect to the database is: $db_link = mysql_connect (sql2.dahl-stamnes.net,stmbk,); This gives me the error: Warning: mysql_connect(): Client does not support authentication protocol

Re: PHP mysql_connect

2006-06-23 Thread Brent Baisley
/doc/refman/4.1/en/old-client.html - Original Message - From: Jørn Dahl-Stamnes [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, June 23, 2006 9:21 AM Subject: PHP mysql_connect I got a strange problem. I run a test-webserver and a MySQL server on the same machine. The code

Re: PHP mysql_connect

2006-06-23 Thread Jørn Dahl-Stamnes
On Friday 23 June 2006 15:30, Brent Baisley wrote: I assume you are using php. It has to do with how the password in mysql is encrypted. On some accounts, the ones that work, it's encrypted in the old way that php can use. The default new, php 4 can't use. Here's the part of the manual that

Re: PHP mysql_connect

2006-06-23 Thread Chris Sansom
At 15:47 +0200 23/6/06, Jørn Dahl-Stamnes wrote: Yes, I forgot to say that I was using PHP... Oh, I think the clue was in the subject line. :-) -- Cheers... Chris Highway 57 Web Development -- http://highway57.co.uk/ Revolution: an abrupt change in the form of misgovernment. -- Ambrose

Re: PHP mysql_connect

2006-06-23 Thread Jochen Kaechelin
Am Freitag, 23. Juni 2006 16:27 schrieb Chris Sansom: At 15:47 +0200 23/6/06, Jørn Dahl-Stamnes wrote: Yes, I forgot to say that I was using PHP... Oh, I think the clue was in the subject line. :-) ever tried localhost as hostname? -- Jochen Kaechelin, fvgi242ss, wlanhacking.de

Re: PHP mysql_connect

2006-06-23 Thread Daniel da Veiga
On 6/23/06, Jørn Dahl-Stamnes [EMAIL PROTECTED] wrote: On Friday 23 June 2006 15:30, Brent Baisley wrote: I assume you are using php. It has to do with how the password in mysql is encrypted. On some accounts, the ones that work, it's encrypted in the old way that php can use. The default

Re: long PHP mysql_connect times

2005-03-18 Thread Dan Tappin
On Mar 18, 2005, at 4:16 AM, Daniel Hawker wrote: Curiouser and curiouser said Alice... When you say *it seems to be the first connect* do you mean in a page, ie the first connect/disconnect takes ages but then any subsequent connects are fine) Exactly. If I use pconnect the first one takes on

Re: long PHP mysql_connect times

2005-03-18 Thread Jeremy Cole
Restating apache resets the issue i.e. the next pconnects takes 5 seconds. Quitting the browser has no effect. I am currently testing now to see if there is a time out issue i.e. if I wait 5 minutes will the delay reappear? FWIW, this sounds like a slow-to-respond DNS resolver. Are Apache

Re: long PHP mysql_connect times [Resolved]

2005-03-18 Thread Dan Tappin
Thanks Jeremy! It was the lack of a reverse DNS entry. I had the host resolved to an IP but now reverse arpa entry. I added the DNS PTR record and viola! I would have never though of / figured that one out. Dan T On Mar 18, 2005, at 10:59 AM, Jeremy Cole wrote: Restating apache resets the

Re: long PHP mysql_connect times [Resolved]

2005-03-18 Thread Jeremy Cole
Hi Dan, It was the lack of a reverse DNS entry. I had the host resolved to an IP but now reverse arpa entry. I added the DNS PTR record and viola! Excellent. Also FWIW, you're not gaining anything by disconnecting after each query in your PHP code. Connect once at the beginning of the script,

long PHP mysql_connect times

2005-03-17 Thread Dan Tappin
I'm not sure if it's a OS X, PHP or MySQL issue so I apologize in advance if this is taken as too off topic. I have a PHP5.x site under development with MySQL 4.1.10. I had the site running fine and there were no speed issues at all. Everything is on the same system (a dual G5 Xserve).

Re: PHP mysql_connect randomly failing

2003-08-22 Thread Antony Dovgal
On Thu, 21 Aug 2003 18:18:37 -0700 Jon Drukman [EMAIL PROTECTED] wrote: that is true, but in this case, neither $php_errmsg nor mysql_error() return anything. i print them both out when the connect fails and they are both just blank. try to use error_reporting(E_ALL); and to see what

Re: PHP mysql_connect randomly failing

2003-08-22 Thread Jon Drukman
Antony Dovgal wrote: try to use error_reporting(E_ALL); and to see what happends. maybe error logging will help you to solve your trouble. I don't beleive in such bugs, it's a problem of your code imho. here's my code: mysql_connect() or die(mysql connect failed: $php_errmsg / . mysql_error());

Re: PHP mysql_connect randomly failing

2003-08-22 Thread Rajesh Kumar
Jon Drukman unknowingly asked us: Antony Dovgal wrote: try to use error_reporting(E_ALL); and to see what happends. maybe error logging will help you to solve your trouble. I don't beleive in such bugs, it's a problem of your code imho. here's my code: mysql_connect() or die(mysql connect

Re: PHP mysql_connect randomly failing

2003-08-21 Thread Jon Drukman
Antony Dovgal wrote: On Tue, 19 Aug 2003 14:36:15 -0700 Jon Drukman [EMAIL PROTECTED] wrote: Approximately 1% of the time it just fails, for no stated reason: Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: in /var/httpd/htdocs/pi/pi.php on line 3 mysql connect failed:

Re: PHP mysql_connect randomly failing

2003-08-21 Thread Antony Dovgal
On Wed, 20 Aug 2003 21:31:48 -0700 Jon Drukman [EMAIL PROTECTED] wrote: mysql_error is not set when mysql_connect fails, because there is no actual mysql resource to get the error message from. yes, there is no mysql resource at this moment. just don't specify it and mysql_error() will tell

Re: PHP mysql_connect randomly failing

2003-08-21 Thread QWERTY
If you reach to maximum mysql connection limit or link limit, mysql_connect will fail. Check limits and current fullness. ---Original Message--- From: Jon Drukman Date: 21 Austos 2003 Perembe 11:32:47 To: [EMAIL PROTECTED] Subject: Re: PHP mysql_connect randomly failing Antony

Re: PHP mysql_connect randomly failing

2003-08-21 Thread Jon Drukman
Antony Dovgal wrote: mysql_error is not set when mysql_connect fails, because there is no actual mysql resource to get the error message from. yes, there is no mysql resource at this moment. just don't specify it and mysql_error() will tell something like Can't connect to local MySQL server

Re: PHP mysql_connect randomly failing

2003-08-21 Thread Daniel Rossi
funny i was just having the same problemo with mysql 3.22 on php3 the most painful system to debug i hate it to bits, anyway mysql_error doesnt get returned on permission or database connection errors, i wonder if that is soughted out in mysql4 ?? maybe this is a php.net question Jon Drukman

Re: PHP mysql_connect randomly failing

2003-08-20 Thread Antony Dovgal
On Tue, 19 Aug 2003 14:36:15 -0700 Jon Drukman [EMAIL PROTECTED] wrote: I've got a library of PHP code whose first line is a mysql_connect statement, like this: $dbh=mysql_connect() or die(mysql connect failed: $php_errmsg); Approximately 1% of the time it just fails, for no stated

PHP mysql_connect randomly failing

2003-08-19 Thread Jon Drukman
I've got a library of PHP code whose first line is a mysql_connect statement, like this: $dbh=mysql_connect() or die(mysql connect failed: $php_errmsg); Approximately 1% of the time it just fails, for no stated reason: Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: in

RE: PHP mysql_connect randomly failing

2003-08-19 Thread Michael S. Fischer
Are you connecting through a TCP or a UNIX domain socket? --Michael -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman Sent: Tuesday, August 19, 2003 2:36 PM To: [EMAIL PROTECTED] Subject: PHP mysql_connect randomly failing I've got a library

Re: PHP mysql_connect randomly failing

2003-08-19 Thread Jon Drukman
unix domain. Michael S. Fischer wrote: Are you connecting through a TCP or a UNIX domain socket? --Michael -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman Sent: Tuesday, August 19, 2003 2:36 PM To: [EMAIL PROTECTED] Subject: PHP mysql_connect randomly