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
Mcrypt_Encrypt to Openssl_Encrypt, and Openssl_Zero_Padding Problems
Warning: Session_Start() Failed: No Such File or Directory
Warning: MySQLi_Query() Expects Parameter 1 to Be MySQLi, Resource Given
Parse a JavaScript File Through PHP
When Using Gmail for Smtp, Can You Set a Different "From" Address
Allow Re-Sending New Order Notification in Woocommerce 5+
Could Not Instantiate Mail Function. Why This Error Occurring
Preg_Replace: Add Number After Backreference
Prevent Innodb Auto Increment on Duplicate Key
How to Prevent PHP Sessions Being Shared Between Different Apache Vhosts
How to Read Cookie/Session Value While Executing PHP5 Script Through Command Prompt
PHP Send E-Mail with Attachment
Are Objects in PHP Assigned by Value or Reference
Is There Way to Keep Delimiter While Using PHP Explode or Other Similar Functions
Automatic Image Format Detection in PHP