#49066 [Fbk->Opn]: CURLOPT_FAILONERROR does not work when CURLOPT_FOLLOWLOCATION is true

2009-08-01 Thread peaceable_whale at hotmail dot com
 ID:   49066
 User updated by:  peaceable_whale at hotmail dot com
 Reported By:  peaceable_whale at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Windows
 PHP Version:  5.3.0
 New Comment:

The path of the root folder of your website.


Previous Comments:


[2009-08-02 00:47:10] j...@php.net

And what it should be set to? :



[2009-07-26 19:19:10] peaceable_whale at hotmail dot com

It should be open_basedir)



[2009-07-26 19:18:02] j...@php.net

What is "open_dir" ??



[2009-07-26 16:16:22] peaceable_whale at hotmail dot com

The previous submitted code doesn't reflect the problem correctly...
The followings are the corrected information:

Description:

CURLOPT_FAILONERROR does not work when CURLOPT_FOLLOWLOCATION is true
and open_dir is set.

PHP Version:

PHP 5.3.0 NTS VC9

Reproduce code:
---
http://example.com/X";);
curl_setopt_array($request,array(CURL_HTTP_VERSION_1_1=>true,CURLOPT_USERAGENT=>"PHP/".phpversion(),CURLOPT_FOLLOWLOCATION=>true,CURLOPT_FAILONERROR=>true,CURLOPT_RETURNTRANSFER=>true));
echo (curl_exec($request)===false?"false":"true")."\r\n";
curl_close($request);
?>

Expected result:

false

Actual result:
--
true)



[2009-07-26 16:01:32] peaceable_whale at hotmail dot com

Description:

CURLOPT_FAILONERROR does not work when CURLOPT_URL is reset. Not false
is returned even when the response code is >=400.

Reproduce code:
---
true,CURLOPT_USERAGENT=>"PHP/".phpversion(),CURLOPT_FAILONERROR=>false,CURLOPT_RETURNTRANSFER=>true));
for($i=0;$i<5;$i++) {
curl_setopt($request,CURLOPT_URL,"http://example.com/".$i);
echo "Trial ".$i.":
".(curl_exec($request)===false?"false":"true")."\r\n";
}
curl_close($request);
?>

Expected result:

Trial 0: false
Trial 1: false
Trial 2: false
Trial 3: false
Trial 4: false

Actual result:
--
Trial 0: true
Trial 1: true
Trial 2: true
Trial 3: true
Trial 4: true





-- 
Edit this bug report at http://bugs.php.net/?id=49066&edit=1



#49066 [Fbk->Opn]: CURLOPT_FAILONERROR does not work when CURLOPT_FOLLOWLOCATION is true

2009-07-26 Thread peaceable_whale at hotmail dot com
 ID:   49066
 User updated by:  peaceable_whale at hotmail dot com
 Reported By:  peaceable_whale at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Windows
 PHP Version:  5.3.0
 New Comment:

It should be open_basedir


Previous Comments:


[2009-07-26 19:18:02] j...@php.net

What is "open_dir" ??



[2009-07-26 16:16:22] peaceable_whale at hotmail dot com

The previous submitted code doesn't reflect the problem correctly...
The followings are the corrected information:

Description:

CURLOPT_FAILONERROR does not work when CURLOPT_FOLLOWLOCATION is true
and open_dir is set.

PHP Version:

PHP 5.3.0 NTS VC9

Reproduce code:
---
http://example.com/X";);
curl_setopt_array($request,array(CURL_HTTP_VERSION_1_1=>true,CURLOPT_USERAGENT=>"PHP/".phpversion(),CURLOPT_FOLLOWLOCATION=>true,CURLOPT_FAILONERROR=>true,CURLOPT_RETURNTRANSFER=>true));
echo (curl_exec($request)===false?"false":"true")."\r\n";
curl_close($request);
?>

Expected result:

false

Actual result:
--
true)



[2009-07-26 16:01:32] peaceable_whale at hotmail dot com

Description:

CURLOPT_FAILONERROR does not work when CURLOPT_URL is reset. Not false
is returned even when the response code is >=400.

Reproduce code:
---
true,CURLOPT_USERAGENT=>"PHP/".phpversion(),CURLOPT_FAILONERROR=>false,CURLOPT_RETURNTRANSFER=>true));
for($i=0;$i<5;$i++) {
curl_setopt($request,CURLOPT_URL,"http://example.com/".$i);
echo "Trial ".$i.":
".(curl_exec($request)===false?"false":"true")."\r\n";
}
curl_close($request);
?>

Expected result:

Trial 0: false
Trial 1: false
Trial 2: false
Trial 3: false
Trial 4: false

Actual result:
--
Trial 0: true
Trial 1: true
Trial 2: true
Trial 3: true
Trial 4: true





-- 
Edit this bug report at http://bugs.php.net/?id=49066&edit=1