#21873 [Fbk->Opn]: cURL not work with tmpfile

From: Date: Wed, 12 Feb 2003 09:33:26 +0000
Subject: #21873 [Fbk->Opn]: cURL not work with tmpfile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32873@lists.php.net to get a copy of this message
ID: 21873 User updated by: SiberianGhost@hotmail.com Reported By: SiberianGhost@hotmail.com -Status: Feedback +Status: Open Bug Type: cURL related Operating System: FreeBSD 4.7 PHP Version: 4.3.0 New Comment: After try php4-STABLE-200302120830 Nothing changed. fseek($fp,0,SEEK_SET); not work. Version 4.2.1 work correct Config command: ./configure --prefix=/home/u6394/php --with-mysql=/usr/local --with-zlib --with-config-file-path=/home/u6394/php43 --with-gd --with-jpeg-dir=/usr/local --with-t1lib --disable-debug --enable-force-cgi-redirect --with-mod_charset --without-pear --disable-rpath --enable-sockets with-openssl --with-curl=/home/u6394/curl Module tested: sapi/cgi/php Previous Comments: ------------------------------------------------------------------------ [2003-02-10 12:56:16] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-01-25 03:39:14] SiberianGhost@hotmail.com It's fseek BUG Whe i modify code to fseek($fp,1,SEEK_SET); fseek($fp,0,SEEK_SET); All work correctly ------------------------------------------------------------------------ [2003-01-25 02:23:21] SiberianGhost@hotmail.com This function return empty result. In PHP 4.2.1 all work correctly. function _HttpsReq($addr) { $ch = curl_init("https://192.0.0.1".$addr); curl_setopt($ch, CURLOPT_HEADER, 0); $fp = tmpfile(); // fwrite($fp," "); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_exec($ch); curl_close($ch); fseek($fp,0,SEEK_SET); $result = fgets($fp,1024); fclose($fp); return $result; } //return empty result When i uncomment string fwrite($fp," "); All work correctly. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21873&edit=1

« previous php.bugs (#32873) next »