blob: 9c92785b0a48dc22db2ac33d189a48aabb4aadb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--TEST--
curl_setopt basic tests.
--CREDITS--
Paul Sohier
#phptestfest utrecht
--INI--
safe_mode=On
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
// start testing
echo "*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode\n";
$url = "{$host}/";
$ch = curl_init();
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$curl_content = curl_exec($ch);
curl_close($ch);
var_dump( $curl_content );
?>
--EXPECTF--
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d
bool(false)
|