Re: memory streams

From: Date: Sun, 17 Mar 2002 12:23:44 +0000
Subject: Re: memory streams
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-81377@lists.php.net to get a copy of this message
Thanks! --Wez. On 17/03/02, "Marcus Börger" wrote: > Found it. The error was in the register function: the size was incorrect > because > > only the pointer has to be stored and not a copy of the wrapper > itself. > > > - return > zend_hash_add(&url_stream_wrappers_hash, protocol, > strlen(protocol), > wrapper, sizeof(wrapper), NULL); > > + return > zend_hash_add(&url_stream_wrappers_hash, protocol, > strlen(protocol), > wrapper, sizeof(*wrapper), NULL); > > > marcus > > > > Date: Sun, 17 Mar 2002 05:26:39 > > +0100 > > > > To: Wez Furlong > > > > From: Marcus Börger > > > > Subject: [PHP-DEV] Re: memory streams > > > > Cc: php-dev@lists.php.net > > > > > > > > > > > Date: Sun, 17 Mar 2002 04:16:07 > > > +0100 > > > > > > To: Wez Furlong > > > > > > From: Marcus Börger > > > > > > > > > Subject: Re: [PHP-DEV] Re: memory streams > > > > > > > > > > As for the strange problems you > > > > have in the exif extension; > > > > > > > > if you switch to a stream opened with > > > > php_stream_fopen_tmpfile(), > > > > > > > > do you still have the same troubles? (So we can try and > > > > pin > > > > > > > > it down!). > > > > > > Yep i tried it and.... > > > > > > Segmentation fault (core dumped) > > > > > > when setting destro = NULL it works...... > > > > Tracked it down to function php_stream_open_url. > > > > I changed > > > > > wrapper > > = &php_stream_http_wrapper; > > > > > // if > > (FAILURE == zend_hash_find(&url_stream_wrappers_hash, > > (char*)protocol, n, (void**)&wrapper)) { > > > > > // wrapper > > = NULL; > > > > > // protocol > > = NULL; > > > > > // } > > > > > > then it is o.k.: wrapper == &php_stream_http_wrapper > > > > but when using zend_hash_find it fails > > > > > > marcus > > > >

« previous php.dev (#81377) next »