xref: /php-src/ext/curl/tests/curl_basic_028.phpt (revision de60872c)
1--TEST--
2Test curl_getinfo() function with CURLOPT_* from curl >= 7.85.0
3--INI--
4open_basedir=.
5--EXTENSIONS--
6curl
7--SKIPIF--
8<?php $curl_version = curl_version();
9if ($curl_version['version_number'] < 0x075500) {
10    exit("skip: test works only with curl >= 7.85.0");
11}
12?>
13--FILE--
14<?php
15include 'server.inc';
16
17$ch = curl_init();
18
19$host = curl_cli_server_start();
20
21$url = "{$host}/get.inc?test=";
22curl_setopt($ch, CURLOPT_URL, $url);
23curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
24var_dump(curl_setopt($ch, CURLOPT_PROTOCOLS_STR, "FilE,DICT"));
25var_dump(curl_setopt($ch, CURLOPT_PROTOCOLS_STR, "DICT"));
26var_dump(curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS_STR, "HTTP"));
27curl_exec($ch);
28curl_close($ch);
29?>
30--EXPECTF--
31Warning: curl_setopt(): The FILE protocol cannot be activated when an open_basedir is set in %s on line %d
32bool(false)
33bool(true)
34bool(true)
35