Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54850 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63405 invoked from network); 24 Aug 2011 08:47:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2011 08:47:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:64464] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/E2-48631-F9AB45E4 for ; Wed, 24 Aug 2011 04:47:28 -0400 Received: by vxh24 with SMTP id 24so891005vxh.29 for ; Wed, 24 Aug 2011 01:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Mq+DhS8za2ZwTWy/LQ6k8hcbCEVIuowPHnu0wlwkZ3I=; b=WBAmAuQo4cWhs6Jog9FuXdH6wtVvsL38vcPAHg2E0t9ZhoJVjdFuKsVcSZFXnaWyfl R827sfsAQdJa5KYP4mvdukRiARuMarCLJiUXCS9PxjXrWsBHhAewwElYfQMAU8GO1lXQ R1zh+Hybdl85IYLVGSjWucH9hCbd3xTmbWtY4= MIME-Version: 1.0 Received: by 10.52.185.197 with SMTP id fe5mr4695964vdc.6.1314175644713; Wed, 24 Aug 2011 01:47:24 -0700 (PDT) Sender: laruence@gmail.com Received: by 10.220.38.193 with HTTP; Wed, 24 Aug 2011 01:47:24 -0700 (PDT) In-Reply-To: <4E54B5B4.2040607@hristov.com> References: <4E54B5B4.2040607@hristov.com> Date: Wed, 24 Aug 2011 16:47:24 +0800 X-Google-Sender-Auth: RiUrt7D6oh2Om96RitzjBQi7ViU Message-ID: To: Andrey Hristov Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [BC]mysql_pconnect generate warning when link against mysqlnd From: laruence@php.net (Laruence) 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 : > =C2=A0Hi, > in my opinion a warning in this case is better than no warning. Because t= his > 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 =3D mysql_pconnect(****); >> sleep(*); //a long time wait the mysql server timeout >> >> if (!mysql_ping($plink)) {} // warning genereated >> >> thanks >> >> 2011/8/24 Laruence: >>> >>> Hi: >>> =C2=A0 =C2=A0when linke mysql against mysqlnd, >>> >>> =C2=A0 =C2=A0call to mysql_pconnect after previous one timeout, =C2=A0c= an trigger a >>> warnning: >>> =C2=A0 =C2=A0 =C2=A0 PHP Warning: =C2=A0mysql_pconnect(): MySQL server = has gone away >>> >>> =C2=A0 =C2=A0while linked against libmysql will not generate this warni= ng. =C2=A0so >>> maybe this should be a BC ? >>> >>> =C2=A0 =C2=A0thanks >>> >>> =C2=A0 =C2=A0test script : >>> =C2=A0 =C2=A0 =C2=A0>> $plink =3D mysql_pconnect("127.0.0.1:3307", "root", ""); >>> >>> mysql_query("set wait_timeout=3D1", $plink); >>> >>> sleep(3); >>> >>> $plink =3D mysql_pconnect("127.0.0.1:3307", "root", ""); >>> >>> >>> >>> >>> -- >>> Laruence =C2=A0Xinchen Hui >>> http://www.laruence.com/ >>> >> >> >> > > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/