Table of Contents

About

Php configuration.

Management

Dynamic

Set

default_socket_timeout is a ini timeout property. To change it dynamically, you use ini_set

ini_set("default_socket_timeout", 1);

Example with the php utility and the r option.

time php -n -r 'ini_set("default_socket_timeout", 1); fopen("https://127.0.0.1/sleepforever.php", "r");'

Get

Gets the value of a configuration option

ini_get()

Static: Php.ini

Location

  • at the command line with php
php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         D:\xampp\php\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

  • the web server: To get the location of the configuration file php.ini, search the section “Loaded Configuration File” from the ouptut of the following php file. Example: phpinfo.php
phpinfo();