How to solve php -ini "Uploaded configuration file: (none)"?

I am trying to install php from source code, but I have a problem, I was looking for it, but nothing useful to me. Firstly, here is my install.sh

make clean ./configure \ --prefix=/usr/local/programs/php5 \ --disable-fileinfo \ --with-config-file-path=/usr/local/programs/php5/etc/php.ini \ --with-config-file-scan-dir=/usr/local/programs/php5/etc/ \ --with-apxs2=/usr/local/programs/apache2.4/bin/apxs if [ 0 != $? ]; then echo "Auto installation failed! -- Configuration" exit fi make if [ 0 != $? ]; then echo "Auto installation failed! -- Make" exit fi sudo make install if [ 0 != $? ]; then echo "Auto installation failed! -- Configuration" exit fi echo "Copying the min size config file." sudo cp php.ini.clean.bk /usr/local/programs/php5/etc/php.ini if [ -a /usr/bin/php ]; then sudo rm /usr/bin/php sudo ln -s /usr/local/programs/php5/bin/php /usr/bin/php fi php --version php --ini 

After completing the script, I got a little strange information here:

 Configuration File (php.ini) Path: /usr/local/programs/php5/etc/php.ini Loaded Configuration File: (none) Scan for additional .ini files in: /usr/local/programs/php5/etc/ Additional .ini files parsed: /usr/local/programs/php5/etc/php.ini 

Why is Loaded Configuration File: (none) null, is there something wrong during installation?

Besides,

 $ ls /usr/local/programs/php5/etc/ pear.conf php.ini php.ini.bk 
+7
php
source share
1 answer

The problem is this:

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

According to configuration help

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

You can see that the with-config-file-path value should not contain php.ini , this is the directory that contains php.ini in it, so it should look like this:

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

Another question is why do people vote for this question for no reason? except @JimiDini

+9
source share

All Articles