File README.default_socket_timeout of Package php-7.0.10
1
Scope of default_socket_timeout Directive
2
=========================================
3
4
default_socket_timeout do not work for SSL connections. This is long
5
standing feature request in PHP upstream bugzilla, see PHP bug #41631.
6
To sum up,
7
8
ini_set("default_socket_timeout", $time);
9
fopen($https_url, "r");
10
11
do not work as intended in the contrast to
12
13
ini_set("default_socket_timeout", $time);
14
fopen($http_url, "r");
15
16
Socket timeout for SSL connections can be set successfully when
17
libcurl trough curl PHP extension is used:
18
19
$ch = curl_init();
20
curl_setopt($ch, CURLOPT_URL, $https_url);
21
curl_setopt($ch, CURLOPT_TIMEOUT, $time);
22
curl_exec($ch);
23
curl_close($ch);
24
25