php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hugo at iwebgroup dot com
New email:
PHP Version: OS:

 

 [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

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC