Php.Ini Is Nonexistent Loaded Configuration File (None)

php.ini is nonexistent Loaded Configuration File (none)

You have to copy the file php.ini-dist from PHP source. Standard way is copying such file to /usr/local/lib/php.ini.

how to solve php --ini Loaded Configuration File:(none)?

The problem is:

--with-config-file-path=/usr/local/programs/php5/etc/php.ini

According the configuration help

--with-config-file-path=PATH
Set the path in which to look for php.ini [PREFIX/lib]

You can see, the value of with-config-file-path should not contains php.ini,
it's a directory which contains php.ini in under it, so it should be like this:

--with-config-file-path=/usr/local/programs/php5/etc

Another question, why people vote down this question without a reason? except @JimiDini

php.ini file nowhere to be found?

Where PHP is installed C:\php there is a php.ini-development and php.ini-production. You can copy or rename one of these to php.ini. These are templates and have all of the default settings that are needed. The main difference is that the development one will have error reporting turned on and the production one will not:

It should be loaded from either the PHP directory C:\php or C:\windows. I use the PHP directory as PHP I believe, will always look in the directory from which PHP is run:

copy c:\php\php.ini-development c:\php\php.ini

Or:

copy c:\php\php.ini-development c:\windows\php.ini

My system:

Configuration File (php.ini) Path       C:\Windows
Loaded Configuration File C:\app\php\php.ini

How to change the path for additional php.ini files

That directory is defined when PHP is compiled from source code using the custom flag --with-config-file-scan-dir:
https://www.php.net/manual/en/configure.about.php#configure.options.php

You can change it at run time by setting an ENV var called PHP_INI_SCAN_DIR as defined in the documentation:
https://www.php.net/manual/en/configuration.file.php#configuration.file.scan



Related Topics



Leave a reply



Submit