ID:               25444
 User updated by:  ict at primus dot ca
 Reported By:      ict at primus dot ca
 Status:           Open
 Bug Type:         *Configuration Issues
 Operating System: W2K
 PHP Version:      4.3.3
 New Comment:

Correct me if i'm wrong, but i think this has sompthing to do with my
problem. When php_ini.c locates the php.ini file, it searchs the
"Search path" but doesn't look at the current directory first?

Plz help, i'm not a C programmer.


        /* Check if php_ini_path_override is a file */
        if (!sapi_module.php_ini_ignore) {
                if (sapi_module.php_ini_path_override &&
sapi_module.php_ini_path_override[0]) {
                        struct stat statbuf;
        
                        if (!VCWD_STAT(sapi_module.php_ini_path_override, &statbuf)) {
                                if (!((statbuf.st_mode & S_IFMT) == S_IFDIR)) {
                                        fh.handle.fp = 
VCWD_FOPEN(sapi_module.php_ini_path_override,
"r");
                                        fh.filename = 
sapi_module.php_ini_path_override;
                                }
                        }
                }
                /* 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;
                        }
                }
        }


Previous Comments:
------------------------------------------------------------------------

[2003-09-09 10:29:00] ict at primus dot ca

Should have read: No C:\winnt\php.ini,

------------------------------------------------------------------------

[2003-09-09 10:27:59] ict at primus dot ca

Perhaps your just jumpy but:

I have to test that the php4isapi.dll will not load the local php.ini
when there is no C:\winnt\


Try Try again.

------------------------------------------------------------------------

[2003-09-09 09:40:22] [EMAIL PROTECTED]

Remove the php.ini from C:\winnt

------------------------------------------------------------------------

[2003-09-08 23:34:12] ict at primus dot ca

Description:
------------
When using php4isapi.dll in IIS the php.ini path can't be specified. 

Details:
OS        Windows 2K
Version   PHP 4.3.3 ( complied VC++ V6.0 )
WServer   IIS 4.X
          Running each .DLL in seperate memory space.

Now this may be more of an issue, for us big server people.



Reproduce code:
---------------
Problem Outline: 
using: C:/client1/php4isapi.dll for /client1/web/index.php
using: C:/client2/php4isapi.dll for /client2/web/index.php
etc ...
They both use C:\winnt\php.ini

Expected result:
----------------
Should use:
using: C:/client1/php4isapi.dll for /client1/web/index.php
Useing C:/client1/php.ini
using: C:/client2/php4isapi.dll for /client2/web/index.php
Useing C:/client2/php.ini
etc...



Actual result:
--------------
Does use:
using: C:/client1/php4isapi.dll for /client1/web/index.php
Useing C:/winnt/php.ini
using: C:/client2/php4isapi.dll for /client2/web/index.php
Useing C:/winnt/php.ini
etc...


I've serched the net and your site, no luck in finding a way of running
serveral copy of the 'php.ini'. I run the sites now with NO .INI and it
works great!

 With no security in place :( 

Please take your time on this one. I might be a simple re-complile or a
complex solution. THX again!

From:
Deek Starr


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25444&edit=1

Reply via email to