Uzytkownik "Ruby Tuesdays" <No************ **********@yaho o.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_mod ule.name));
sprintf(ini_fna me, fmt, sapi_module.nam e);
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;
}
}