For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > June 2006 > #37782 [Bgs]: php.ini in CWD not parsed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #37782 [Bgs]: php.ini in CWD not parsed
nlopess@php.net

2006-06-18, 7:57 am

ID: 37782
Updated by: nlopess@php.net
Reported By: lordi at msdi dot ca
Status: Bogus
Bug Type: Documentation problem
Operating System: Windows 2003
PHP Version: 5.1.4
New Comment:

Ah, the CGI SAPI doesn't read the current dir, yes (security purpose).
But it is described in the page you mention.


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

[2006-06-18 10:33:57] lordi at msdi dot ca

Sorry, it's a typo in my previous message...

I was talking about php-cgi.exe not php-cli.exe

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

[2006-06-16 16:49:15] nlopess@php.net

php-cli.exe is available in PHP 4 only. I've tested with php 5.2 and
everything is working correctly.

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

[2006-06-16 16:36:34] colder@php.net

I can't reproduce it (php5.1.4 @ windowsXP)

Anyway, where did you find a php-cli.exe file ?
The CLI executable is only called php.exe in PHP5.

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

[2006-06-12 01:59:50] lordi at msdi dot ca

Description:
------------
Based on this page:
http://ca.php.net/manual/en/configu...egister-globals

a php.ini file located in the current directory should be parsed before
a file located in c:\windows\php.ini

If I use the php-cli.exe to parse files from iis, the
c:\windows\php.ini is parsed even if there is a php.ini file in the
local directory of the called script...

I tested the directory with getcwd() and it showed the right path...

I ran sysinternals filemon and I confirmed the bug or at least the
documentation problem...

Tracing the disk access, I saw php-cli.exe tried to access c:\php.ini
but got a not found error
Then the process tried to access c:\windows\php.ini which succeeded,
but without trying to load the php.ini file from the documentation as
per the documentation...

This worked fine in php 5.03, I just upgraded/clean reinstalled today

It might be a big security risk for people relying on local php.ini
files since it's another php.ini file that gets parsed



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


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







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com