1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Files
archived-php-src/ext/curl/tests/bug65646_open_basedir_new.phpt
T
Christoph M. Becker 7426e3b6a1 Bump required libcurl version to 7.29.0
libcurl 7.29.0 has been released almost eight years ago, so this
version is supposed to be available practically everywhere.  This bump
also allows us to get rid of quite some conditional code and tests
catering to very old libcurl versions.
2020-01-19 14:10:46 +01:00

25 lines
739 B
PHP

--TEST--
Bug #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir or safe_mode): open_basedir enabled; curl >= 7.19.4
--INI--
open_basedir=.
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--FILE--
<?php
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true));
var_dump(curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_FILE));
var_dump(curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_FILE));
curl_close($ch);
?>
--EXPECTF--
bool(true)
Warning: curl_setopt(): CURLPROTO_FILE cannot be activated when an open_basedir is set in %s on line %d
bool(false)
Warning: curl_setopt(): CURLPROTO_FILE cannot be activated when an open_basedir is set in %s on line %d
bool(false)