Re: pfsockopen

From: Date: Thu, 05 Oct 2000 23:30:46 +0000
Subject: Re: pfsockopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18780@lists.php.net to get a copy of this message
On Wed, Oct 04, 2000 at 05:39:36PM +0100, gavin.wood@hudd.rage.co.uk wrote: > I am using php 4.0.1pl2 with Apache and Windows ME. I can open a socket to > my own C++ server using pfsockopen and then happily use fputs and fgets. > Why can't I use the same socket in other .php files????? > This problem is mentioned in the archive but the thread died away... > > I have tried the following with no luck: > .saving the file handle by saving to a session and then reloading in > another php file > .submitting the file handle to the second file > These produce the error: Warning: Supplied argument is not a valid > File-Handle resource The problem imho is that the type of the filepointer as returned by (p)fsockopen is a resource. When you try to pass the file pointer to the between phpfiles the type changes to string. Funny thing is that (according) to the documentation settype doesn't support the type resource 8-( Anoyone any idea how to make a persistent connection in PHP work? -- Daniel Tryba

« previous php.general (#18780) next »