Barrie Reader
Barrie Reader

Reputation: 10713

Using INI_SET within a PHP page

If I use ini_set('default_socket_timeout',30); within a PHP page, will this affect all socket calls made on the server or just those on this pages current lifetime?

Cheers!

Upvotes: 2

Views: 106

Answers (3)

mtt
mtt

Reputation: 106

Only in current script call.

See PHP ini_set

Upvotes: 1

fullybaked
fullybaked

Reputation: 4127

Just those made during the request using that script.

All other requests will use the defaults in the php.ini file

Upvotes: 2

mimipc
mimipc

Reputation: 1374

As the PHP manual page says :

The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

Source : http://php.net/manual/en/function.ini-set.php

Upvotes: 4

Related Questions