php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24748 URL in curl_ini() echos out data
Submitted: 2003-07-22 01:43 UTC Modified: 2003-07-22 01:54 UTC
From: nopass@php.net Assigned:
Status: Not a bug Package: cURL related
PHP Version: 4.3.3RC1 OS: Linux, RH8.0
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: nopass@php.net
New email:
PHP Version: OS:

 

 [2003-07-22 01:43 UTC] nopass@php.net
Description:
------------
$ch = curl_ini("http://www.php.net/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($ch);

Will echo the page out to the browser even though you specified not to do so with the non-zero RETURNTRANSFER value.

If you instead do:

$ch = curl_ini();
curl_setopt($ch, CURLOPT_URL, "http://www.php.net/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($ch);


The problem goes away.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-22 01:54 UTC] nopass@php.net
Oops, bug in my code. Sorry.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 23:01:29 2024 UTC