Nasıl başka bir php.ini dosyasında bir php.ini dosyası içerir mi?
Ben ana php.ini dosyasında. Ini "include" sanmıyorum.
Olası bir çözüm olsa da, PHP derlerken, configure satırında bu seçeneği kullanmak olabilir:
--with-config-file-scan-dir=PATH
Set the path where to scan for configuration files
Bu seçenek derleme zamanında kullanılırsa, PHP her arayacaktır. Ini dosyası bu dizinde, "normal" php.ini dosyasına ek olarak.
Ben yerine php.ini değiştirerek her indirilen uzantısı için farklı. Ini dosyası, kullanan, örneğin, bu Ubuntu tarafından kullanılan budur herhalde.
Configure satırında, bu seçeneği ile tanımlanan php.ini dosyasının yolu:
--with-config-file-path=PATH
Set the path in which to look for php.ini [PREFIX/lib]
İhtiyacınız bağımlılıkları almak olmanın en zor kısmı - zor, btw hangi değil - Yine de, muhtemelen yeniden derlemek PHP gerekecek demektir.
Sen yapamazsın. Online sayfalarını okuyun:
SUMMARY: The configuration file (php.ini) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI version, it happens on every invocation.
SUMMARY: In addition to the main php.ini file, PHP scans for INI files in each directory, starting with the directory of the requested PHP file, and working its way up to the current document root (as set in $_SERVER['DOCUMENT_ROOT']). Only INI settings with the modes PHP_INI_PERDIR and PHP_INI_USER will be recognized in .user.ini-style INI files.
Ben php için memcached yüklü ve onun ini benim php.ini dahil emin olmak için nasıl emin değildi, ama çıkıyor gibi otomatik olarak. Çalıştırdığınız tarafından yüklenen ediliyor ne doğrulamak php --ini
.
php --ini
Configuration File (php.ini) Path: /opt/local/etc/php5
Loaded Configuration File: (none)
Scan for additional .ini files in: /opt/local/var/db/php5
Additional .ini files parsed: /opt/local/var/db/php5/memcached.ini
Bunu ini_set fonksiyonunun yararlanarak taklit deneyebilirsiniz. "Man sayfası" belirttiği gibi, tüm ini seçenekleri ini_set kullanılarak değiştirilebilir. Ama, kesinlikle yararlı bir fonksiyon.