Uzytkownik "Ruby Tuesdays" <No**********************@yahoo.com> napisal w
wiadomosci news:c4*************@ID-205437.news.uni-berlin.de...
Where do you tell PHP(Apache) and PHP(IIS) of what php.ini to use?
I can't use PHPRC since it looks for php.ini file in a specified
directory.
You don't have to. PHP looks for the SAPI specific ini file before it loads
the generic one. In php_ini.c (in the PHP source), you find the following:
/* Search php-%sapi-module-name%.ini file in search path */
if (!fh.handle.fp) {
const char *fmt = "php-%s.ini";
char *ini_fname = emalloc(strlen(fmt) + strlen(sapi_module.name));
sprintf(ini_fname, fmt, sapi_module.name);
fh.handle.fp = php_fopen_with_path(ini_fname, "r", php_ini_search_path,
&php_ini_opened_path TSRMLS_CC);
efree(ini_fname);
if (fh.handle.fp) {
fh.filename = php_ini_opened_path;
}
}
/* Search php.ini file in search path */
if (!fh.handle.fp) {
fh.handle.fp = php_fopen_with_path("php.ini", "r", php_ini_search_path,
&php_ini_opened_path TSRMLS_CC);
if (fh.handle.fp) {
fh.filename = php_ini_opened_path;
}
}