|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8892 The last caractere of the output is replace by a \0
Submitted: 2001-01-24 18:39 UTC Modified: 2001-01-24 18:44 UTC
From: hugo at iwebgroup dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0.4pl1 OS: Red Hat Linux release 6.0 (Hedwi
Private report: No CVE-ID: None
 [2001-01-24 18:39 UTC] hugo at iwebgroup dot com
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


$ch = curl_init("");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "output=allo");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,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>";


a -97
l -108
l -108


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-24 18:44 UTC]
This is fixed in CVS. Please try latest snapshot from
(works for me just fine) Reopen this bug report if problem still exists with
latest CVS snapshot.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Jun 20 22:01:24 2021 UTC