Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46287 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74353 invoked from network); 5 Dec 2009 17:13:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2009 17:13:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=arnaud.lb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arnaud.lb@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.211 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arnaud.lb@gmail.com X-Host-Fingerprint: 209.85.219.211 mail-ew0-f211.google.com Received: from [209.85.219.211] ([209.85.219.211:39631] helo=mail-ew0-f211.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/82-54527-FB49A1B4 for ; Sat, 05 Dec 2009 12:13:35 -0500 Received: by ewy3 with SMTP id 3so508308ewy.33 for ; Sat, 05 Dec 2009 09:13:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=vgot/laHU8Pl93ENy8u1r/T0yzhVFoxpy9SW+I/UGgo=; b=QEi5nU4Be0UfiDLYYs8hd1clt90ti7OmmvpW6u+kJrt//o/u5/nbjg8Qwsr0skueoW wwhAKLFCJ6+wlcxjyuXruStbVlxTVfcibWVJ+F9ZrfuPKJvGQUJXraDKQMnqHVqH/AZo gFByXt4Tj1MRZs/E6D3x9/t1nOUQBAJPLCDPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=Oe/y1eiqgy0SuWxgZK2Cu2afcYF8V0WC5AZoWRLq8NJWa538941JWpv9Z8O7QexTUy xrqZ7wg0pCsbn5hriEqvuQ7t+U9M4K1s0gYwNn9s2ZNZM5xgNmDeHeDnhEBymIJ75Omq ac8NP36WKQBj61NVZnTrtcXcnJbRGvxiiNDg0= Received: by 10.213.47.9 with SMTP id l9mr1055258ebf.93.1260033210161; Sat, 05 Dec 2009 09:13:30 -0800 (PST) Received: from ?192.168.0.10? (130-244-168-88.selfip.net [88.168.244.130]) by mx.google.com with ESMTPS id 23sm6884847eya.27.2009.12.05.09.13.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Dec 2009 09:13:29 -0800 (PST) Sender: Arnaud LB To: Samuel ROZE Cc: PHP Internals In-Reply-To: <1260032426.32429.12.camel@samuel-laptop> References: <1259967673.18144.4.camel@samuel-laptop> <1260016856.5398.21.camel@noch2> <1260032426.32429.12.camel@samuel-laptop> Content-Type: text/plain; charset="UTF-8" Date: Sat, 05 Dec 2009 18:13:30 +0100 Message-ID: <1260033210.5398.48.camel@noch2> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Stream: Cast and Seek From: lbarnaud@php.net (Arnaud Le Blanc) Le samedi 05 décembre 2009 à 18:00 +0100, Samuel ROZE a écrit : > Thanks for you reply ! :-) > I think that my cast isn't very good because I've: > > Warning: stream_select(): You MUST recompile PHP with a larger value of FD_SETSIZE. > It is set to 1024, but you have descriptors numbered at least as high as 1728763902. > --enable-fd-setsize=1728763904 is recommended, but you may want to set it > to equal the maximum number of open files supported by your system, > in order to avoid seeing this error again at a later date. in ... Check if stream->abstract is a php_ssh2_session_data (looks like it may be a _channel_data instead). > > That my cast code (patch on PHP 5.3 branche): > http://www.d-sites.com/wp-content/uploads/2009/12/cast_ssh2_stream.patch > > Is there something wrong ? > > Regards, > Samuel. > > Le samedi 05 décembre 2009 à 13:40 +0100, Arnaud Le Blanc a écrit : > > Hi, > > > > Le samedi 05 décembre 2009 à 00:01 +0100, Samuel ROZE a écrit : > > > Hello, > > > > > > I'm working on the use of a PHP SSH2 Stream returned by ssh2_shell > > > function with stream_select() function. Within the PHP code, before > > > being used into the select() C function, a stream have to be "casted"... > > > The problem is that I don't really know what is it and how it generally > > > works. > > > > > > So, can someone explain to me what means "cast" and "seek" streams ? > > > > > > (In fact, I have to cast a php_ssh2_channel_stream) > > > > Here you need to return the underlaying socket on which the ssh session > > is established, so that the OS's select() can work on it. Look at > > php_openssl_sockop_cast for an example. > > > > Regards, > > > > Arnaud > > > > > > > > Thanks a lot. > > > Regards, > > > Samuel ROZE. > > > > > > > > > > > > >