Re: mysql_ping()

2002-06-03 Thread [EMAIL PROTECTED]
What I want to know, is: 1) after reading the header, how should one respond? 2) Is a command necessary, or can one close after succesfully authenticating? 3) Is there a sign-off? Ie - what does a minimal valid connection look like? I may be totally off, but couldn't you just try to open

RE: mysql_ping()

2002-06-03 Thread Stefan Immel
I may be totally off, but couldn't you just try to open a socket to the relevant port - if it goes OK, you're fine. If not, well... example code in PHP: if($fp = fsockopen($host_domain, $port, $errno, $errstr, $timeout)){ // - juhuu! }else{ // - boohoo... } This

Re: mysql_ping()

2002-06-03 Thread Gelu Gogancea
COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Melvyn Sopacua [EMAIL PROTECTED] To: Gelu Gogancea [EMAIL PROTECTED] Cc: MySQL General [EMAIL PROTECTED] Sent: Monday, June 03, 2002 4:30 AM Subject: Re

Re: mysql_ping()

2002-06-03 Thread Melvyn Sopacua
At 03:52 3-6-2002, Mark Matthews shared with all of us: So - indeed - I'm probably barking up the wrong tree, by looking at mysql_ping(), but I basically want to mimmick the behavior, so the there's no connection error for the webserver involved. See it as Net::SMTP, using a simple HELO -

Re: mysql_ping()

2002-06-02 Thread Gelu Gogancea
Hi, mysql_ping check connection to server. In documentation at 8.4.3.163 mysql_ping() you can find more details about that. Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED]

Re: mysql_ping()

2002-06-02 Thread Melvyn Sopacua
At 19:53 2-6-2002, Gelu Gogancea shared with all of us: mysql_ping check connection to server. In documentation at 8.4.3.163 mysql_ping() you can find more details about that. Yeah right. Did you actually take a look? Reading the source gives me more information. I know it returns an integer,

Re: mysql_ping()

2002-06-02 Thread Gelu Gogancea
[EMAIL PROTECTED] To: Gelu Gogancea [EMAIL PROTECTED] Cc: MySQL General [EMAIL PROTECTED] Sent: Sunday, June 02, 2002 9:13 PM Subject: Re: mysql_ping() At 19:53 2-6-2002, Gelu Gogancea shared with all of us: mysql_ping check connection to server. In documentation at 8.4.3.163 mysql_ping() you

Re: mysql_ping()

2002-06-02 Thread Melvyn Sopacua
Hi Gelu, At 21:52 2-6-2002, Gelu Gogancea shared with all of us: Indeed, mysql_simple_command (with COM_PING command like argument ) is used by C API mysql_ping, to check connection.MYSQL struct it's used like handler. For a connection you must use in order: mysql_init(),

Re: mysql_ping()

2002-06-02 Thread Gelu Gogancea
Hi, Just now i read carefully your previous maili don't know if is possible to create a socket/used with PHP. In principle a client socket it's some like this: if ((sock=socket(AF_INET,SOCK_STREAM,0))0) --create socket file { .perror(Can't create socket: socket()); .exit(1);

Re: mysql_ping()

2002-06-02 Thread Gelu Gogancea
Subject: Re: mysql_ping() Hi Gelu, At 21:52 2-6-2002, Gelu Gogancea shared with all of us: Indeed, mysql_simple_command (with COM_PING command like argument ) is used by C API mysql_ping, to check connection.MYSQL struct it's used like handler. For a connection you must use in order

Re: mysql_ping()

2002-06-02 Thread Mark
- Original Message - From: Melvyn Sopacua [EMAIL PROTECTED] To: Gelu Gogancea [EMAIL PROTECTED] Cc: MySQL General [EMAIL PROTECTED] Sent: Sunday, June 02, 2002 10:27 PM Subject: Re: mysql_ping() So... you don't need mysql_ping ... unless if want to check periodical if the server

Re: mysql_ping()

2002-06-02 Thread Melvyn Sopacua
Hi Mark, At 02:04 3-6-2002, Mark shared with all of us: Yes and no. I do want that, but afterwards I want to connect. It still does not look to me like you really want to ping the server. What you seem to want is to check whether the server is alive; and if not, reconnect; right? Connect -

Re: mysql_ping()

2002-06-02 Thread Melvyn Sopacua
Hi Gelu, At 23:10 2-6-2002, Gelu Gogancea shared with all of us: I'm sorry ... i didn't read carefully you mail No problem. Anyway, my opinion is that you should use(i don't know if is possible) the mysql_options to set time out. That works if only mysqld is down and the machine is

Re: mysql_ping()

2002-06-02 Thread Mark Matthews
Melvyn Sopacua wrote: Hi Mark, At 02:04 3-6-2002, Mark shared with all of us: Yes and no. I do want that, but afterwards I want to connect. It still does not look to me like you really want to ping the server. What you seem to want is to check whether the server is alive; and if not,