FAQ
Hi:
when linke mysql against mysqlnd,

call to mysql_pconnect after previous one timeout, can trigger a warnning:
PHP Warning: mysql_pconnect(): MySQL server has gone away

while linked against libmysql will not generate this warning. so
maybe this should be a BC ?

thanks

test script :
<?php
$plink = mysql_pconnect("127.0.0.1:3307", "root", "");

mysql_query("set wait_timeout=1", $plink);

sleep(3);

$plink = mysql_pconnect("127.0.0.1:3307", "root", "");




--
Laruence  Xinchen Hui
http://www.laruence.com/

Search Discussions

  • Laruence at Aug 24, 2011 at 7:36 am
    And the same warnings will be throw while call mysql_ping too.

    $plink = mysql_pconnect(****);
    sleep(*); //a long time wait the mysql server timeout

    if (!mysql_ping($plink)) {} // warning genereated

    thanks

    2011/8/24 Laruence <laruence@php.net>:
    Hi:
    when linke mysql against mysqlnd,

    call to mysql_pconnect after previous one timeout,  can trigger a warnning:
    PHP Warning:  mysql_pconnect(): MySQL server has gone away

    while linked against libmysql will not generate this warning.  so
    maybe this should be a BC ?

    thanks

    test script :
    <?php
    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");

    mysql_query("set wait_timeout=1", $plink);

    sleep(3);

    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");




    --
    Laruence  Xinchen Hui
    http://www.laruence.com/


    --
    Laruence  Xinchen Hui
    http://www.laruence.com/
  • Andrey Hristov at Aug 24, 2011 at 8:26 am
    Hi,
    in my opinion a warning in this case is better than no warning. Because
    this shows a problem and even if display_warnings is off the warnings
    can be logged for further inspection.

    Best,
    Andrey
    On 08/24/2011 09:35 AM, Laruence wrote:
    And the same warnings will be throw while call mysql_ping too.

    $plink = mysql_pconnect(****);
    sleep(*); //a long time wait the mysql server timeout

    if (!mysql_ping($plink)) {} // warning genereated

    thanks

    2011/8/24 Laruence<laruence@php.net>:
    Hi:
    when linke mysql against mysqlnd,

    call to mysql_pconnect after previous one timeout, can trigger a warnning:
    PHP Warning: mysql_pconnect(): MySQL server has gone away

    while linked against libmysql will not generate this warning. so
    maybe this should be a BC ?

    thanks

    test script :
    <?php
    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");

    mysql_query("set wait_timeout=1", $plink);

    sleep(3);

    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");




    --
    Laruence Xinchen Hui
    http://www.laruence.com/
  • Laruence at Aug 24, 2011 at 8:47 am
    Hi:
    hmm,

    but it really no sense for mysql_ping.

    the function used to identified a link whether valid, and if not
    valid, return a false is enough :)

    thanks

    2011/8/24 Andrey Hristov <php@hristov.com>:
    Hi,
    in my opinion a warning in this case is better than no warning. Because this
    shows a problem and even if display_warnings is off the warnings can be
    logged for further inspection.

    Best,
    Andrey
    On 08/24/2011 09:35 AM, Laruence wrote:

    And the same warnings will be throw while call mysql_ping too.

    $plink = mysql_pconnect(****);
    sleep(*); //a long time wait the mysql server timeout

    if (!mysql_ping($plink)) {} // warning genereated

    thanks

    2011/8/24 Laruence<laruence@php.net>:
    Hi:
    when linke mysql against mysqlnd,

    call to mysql_pconnect after previous one timeout,  can trigger a
    warnning:
    PHP Warning:  mysql_pconnect(): MySQL server has gone away

    while linked against libmysql will not generate this warning.  so
    maybe this should be a BC ?

    thanks

    test script :
    <?php
    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");

    mysql_query("set wait_timeout=1", $plink);

    sleep(3);

    $plink = mysql_pconnect("127.0.0.1:3307", "root", "");




    --
    Laruence  Xinchen Hui
    http://www.laruence.com/


    --
    Laruence  Xinchen Hui
    http://www.laruence.com/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedAug 24, '11 at 7:30a
activeAug 24, '11 at 8:47a
posts4
users2
websitephp.net

2 users in discussion

Laruence: 3 posts Andrey Hristov: 1 post

People

Translate

site design / logo © 2022 Grokbase