Why doesn't php read my php.ini file?

There are many questions like this, but I have not found what explains this behavior. I will try to address the things that are covered in similar issues when I go:

I installed php 5.3.28 from the source and copied php.ini-production from the source to / usr / local / etc / php 53 / php.ini. I used the following configuration options so that PHP reads this file.

# Rearranged for readability
Configure Command =>  './configure'  
                  '--with-config-file-path=/usr/local/etc/php53' 
                  '--with-config-file-scan-dir=/usr/local/etc/php53/conf.d'
                  '--prefix=/usr/local' 
                  '--enable-debug' '--enable-mbstring' '--enable-soap' '--enable-zip' '--with-bz2' '--with-curl' '--with-gettext' '--with-mcrypt' '--with-mhash' '--with-mysql' '--with-openssl' '--with-pdo-mysql' '--with-pspell' '--with-readline' '--with-tidy' '--with-xsl'

Well, PHP does not read this file.

$ php -i | grep Configuration' File'
Configuration File (php.ini) Path => /usr/local/etc/php53
Loaded Configuration File => (none)
$ php --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

How can it be that php -ithey php --inihave a different output for the configuration file (php.ini) Path?

( / , php . , php , php . , Apache php Apache, .)

php:

$ env | grep PHP
$ export | grep -iF php
$ set | grep -iF php

.

, php , , ( , php )

$ php -nc /usr/local/etc/php53/php.ini -i | grep -F Configuration' Fi'
Configuration File (php.ini) Path => /usr/local/etc/php53
Loaded Configuration File => /usr/local/etc/php53/php.ini
$ php -nc /usr/local/etc/php53/php.ini --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/etc/php53/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

configure, ?

+4

All Articles