1

I've installed PHP 7.2.3 on my machine running on Windows 10 using the latest copy of XAMPP installer.

So, I'm running Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.3

I come across following line from the PHP Manual

SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)

I checked into the output of

<?php phpinfo(); ?>

but I couldn't find out a directive named PHPIniDir anywhere.

Can someone please help me in finding out/locating the PHPIniDir directive?

Thanks.

PHPFan
  • 4,300
  • 13
  • 57
  • 117

1 Answers1

3

The value you're looking for is displayed in the Loaded Configuration File section:

enter image description here

phpinfo() does not get into details of where or how each setting is set, beyond the Local/Master columns of the PHP directives themselves.

As your quote suggests, PHPIniDir is an Apache HTTP Server directive provided by the mod_php module (in other words, PHPIniDir is not a PHP directive) so you configure it in Apache configuration files:

mod_php7.conf

Álvaro González
  • 135,557
  • 38
  • 250
  • 339
  • If such is the case then why on the PHP directive list page at https://secure.php.net/manual/en/ini.list.php also there is no such directive titled 'PHPIniDir' and what are local and master values? What's the need of having two values for few directives? – PHPFan Mar 25 '18 at 10:08
  • You mean to say there is no such PHP directive titled 'PHPIniDir' exist! Right? – PHPFan Mar 25 '18 at 13:29
  • Yes, I meat that. – Álvaro González Mar 27 '18 at 06:39