PHP 4.0 Bug #8892: The last caractere of the output is replace by a \0

From: Date: Wed, 24 Jan 2001 23:39:26 +0000
Subject: PHP 4.0 Bug #8892: The last caractere of the output is replace by a \0
Groups: php.dev 
Request: Send a blank email to php-dev+get-44932@lists.php.net to get a copy of this message
From: hugo@iwebgroup.com Operating system: Red Hat Linux release 6.0 (Hedwig) PHP version: 4.0.4pl1 PHP Bug Type: cURL related Bug description: The last caractere of the output is replace by a \0 The last caractere of the output is replace by a \0 when I use CURLOPT_RETURNTRANSFER with curl I know the the bug is supposed to be fix for WIndows OS... but i still have the problem under Linux You can see the problem in this little script INPUT: ALLO <?php $ch = curl_init("https://www.secure-ssl.net/secure.iwebreservation.com/output.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "output=allo"); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,URLOPT_VERBOSE,1); $toto = curl_exec ($ch); curl_close ($ch); echo "[$toto]<br>"; for ($i=0;$i<strlen($toto);$i++) echo "$toto[$i] -".ord($toto[$i])."<br>"; ?> Output: [all] a -97 l -108 l -108 -0 -- Edit Bug report at: http://bugs.php.net/?id=8892&edit=1

« previous php.dev (#44932) next »