Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55377 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94032 invoked from network); 12 Sep 2011 04:45:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2011 04:45:33 -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:45535] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/20-26895-B6E8D6E4 for ; Mon, 12 Sep 2011 00:45:31 -0400 Received: by vxi32 with SMTP id 32so1396348vxi.29 for ; Sun, 11 Sep 2011 21:45:28 -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:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=AjVXxTbjzfTsNfFRc633qoN0Owxn9gFeAAk6pkdG2SA=; b=KEkbZy5taoI6hu4zHJ4LzKXCse+In+1M/3RP/AySDnRDQnsKa07RcHejbjmOh4FDuQ /qWsJpX0jLP7pdnSJoN441CcEg3S/HvqLm6uzJHpx52PCcrb3IMI99FZdJZGcScWg+gS IPJR+mSVjwe8/4wvTctr3CW0DKmDf9kPIDREM= Received: by 10.52.35.112 with SMTP id g16mr1293565vdj.24.1315802727147; Sun, 11 Sep 2011 21:45:27 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.220.94.142 with HTTP; Sun, 11 Sep 2011 21:45:07 -0700 (PDT) In-Reply-To: References: <4E6B9466.6060608@elitehosts.com> <4E6D1340.6010408@elitehosts.com> <4E6D5263.60509@elitehosts.com> Date: Mon, 12 Sep 2011 12:45:07 +0800 X-Google-Sender-Auth: awPE4FGvWHoK3kgC35z55Q1zO3U Message-ID: To: Avi Brender Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH]#55651 From: laruence@php.net (Laruence) hmm, after deep looking, I found maybe this behavior(cann't connect to NAT server when use pasv mode) is "as expected", since this is not php ftp-ext issue, but a ftp server configure issue, that is, if we apply this patch, will make the php ftp-ext not a standard ftp protocl executor. thanks 2011/9/12 Laruence : > 2011/9/12 Avi Brender : >> Hi, >> >> Please see if the attached patch better addresses your concerns. >> >> Regarding the variable name, the PHP_FTP_OPT_USEPASVADDRESS is only inte= rnal >> and is modeled after the other variables PHP_FTP_TIMEOUT_SEC and >> PHP_FTP_OPT_AUTOSEEK. The variable actually passed to the ftp_set_option= () >> function by users is FTP_USEPASVADDRESS as defined in php_ftp.c which is >> inline with the other variables FTP_AUTORESUME, FTP_TIMEOUT_SEC, >> FTP_AUTOSEEK etc. >> >> In terms of tests, what type of tests were you thinking of? We can't ens= ure >> that ftp->pasvaddr is set properly in response to a PASV command unless > actually I think it can, =C2=A0plz refer to the existing test config scri= pt > "server.inc" under the ftp/tests/, > and maybe you can simulate a test environ? > > and thanks for your work on PHP >> there's a way to expose those internal variables to the test - I'm not >> familiar enough with the internal PHP code to know if that's possible. I= f >> you're referring to tests that ensure that 1/0 true/false values passed = to >> ftp_set_option() work properly then I've attached a test file for that. >> >> I don't want to clutter the bugzilla ticket with many attachments =C2=A0= so once >> the patch is approved I will post the final version in the ticket if tha= t's >> okay. >> >> All the best, >> >> Avi Brender >> Elite Hosts, Inc >> www.elitehosts.com >> ------------------------------------------------ >> WARNING !!! This email message is for the sole use of the intended >> recipient(s) and may contain confidential and privileged information. An= y >> unauthorized review; use, disclosure or distribution is prohibited, and >> could result in criminal prosecution. If you are not the intended recipi= ent, >> please contact the sender by reply email and destroy all copies of the >> original message. This message is private and is considered a confidenti= al >> exchange - public disclosure of this electronic message or its contents = are >> prohibited. >> >> >> On 09/11/2011 04:24 PM, Pierre Joye wrote: >>> >>> hi! >>> >>> Please upload the patch in the bug tracker as well. >>> >>> It would be also better to use a more verbose name. >>> FTP_OPT_USEPASVADDRESS is somehow cryptic. >>> >>> Laruence's comment is still valid, the zval should be converted if it >>> is not int or bool. >>> >>> Btw, could you test cases as well please? >>> >>> Cheers, >>> >>> On Sun, Sep 11, 2011 at 10:00 PM, Avi Brender >>> =C2=A0wrote: >>>> >>>> Hi, >>>> >>>> I've updated the patch - please see attached. >>>> >>>> Avi Brender >>>> Elite Hosts, Inc >>>> www.elitehosts.com >>>> ------------------------------------------------ >>>> WARNING !!! This email message is for the sole use of the intended >>>> recipient(s) and may contain confidential and privileged information. = Any >>>> unauthorized review; use, disclosure or distribution is prohibited, an= d >>>> could result in criminal prosecution. If you are not the intended >>>> recipient, >>>> please contact the sender by reply email and destroy all copies of the >>>> original message. This message is private and is considered a >>>> confidential >>>> exchange - public disclosure of this electronic message or its content= s >>>> are >>>> prohibited. >>>> >>>> On 09/11/2011 10:53 AM, Pierre Joye wrote: >>>>> >>>>> hi, >>>>> >>>>> A simple test if it is IS_BOOL or IS_LONG should be enough, both type= s >>>>> use the the long value (convert_to_boolean_ex is slow and duplicate >>>>> the zval while it is not necessary). Then test> =C2=A00 instead of si= mply >>>>> assigning the value. >>>>> >>>>> On Sun, Sep 11, 2011 at 5:59 AM, Laruence =C2=A0wro= te: >>>>>> >>>>>> Hi: >>>>>> =C2=A0 =C2=A0after a quick look, =C2=A0I have one suggestion, >>>>>> =C2=A0 =C2=A0if the (Z_TYPE_P(z_value) !=3D IS_BOOL), you should cal= l >>>>>> convert_to_boolean_ex to convert it to a boolean >>>>>> =C2=A0 =C2=A0otherwise, people can not use a interge 1 as a true fla= g. >>>>>> >>>>>> =C2=A0 =C2=A0thanks >>>>>> >>>>>> 2011/9/11 Avi Brender: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I've submitted bug #55651 along with a patch to implement a fix (al= so >>>>>>> attached) for the passive FTP mode issue. I was hoping that someone >>>>>>> could >>>>>>> review the bug report and consider the patch for inclusion in futur= e >>>>>>> PHP >>>>>>> releases. >>>>>>> >>>>>>> Thanks so much! >>>>>>> >>>>>>> Avi Brender >>>>>>> Elite Hosts, Inc >>>>>>> www.elitehosts.com >>>>>>> >>>>>>> -- >>>>>>> PHP Internals - PHP Runtime Development Mailing List >>>>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Laruence =C2=A0Xinchen Hui >>>>>> http://www.laruence.com/ >>>>>> >>>>>> -- >>>>>> PHP Internals - PHP Runtime Development Mailing List >>>>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> -- >>>> PHP Internals - PHP Runtime Development Mailing List >>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >>> >>> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > > -- > Laruence =C2=A0Xinchen Hui > http://www.laruence.com/ > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/