FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Figure out path to php.ini
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Figure out path to php.ini [message #173403 is a reply to message #173401] Fri, 08 April 2011 16:07 Go to previous messageGo to previous message
James Carlock is currently offline  James Carlock
Messages: 3
Registered: April 2011
Karma:
Junior Member
"Mike" <mpearl1 .at. gmail dot com> wrote:
: How can a php script figure out the path to the php.ini
: file WITHOUT phpinfo() enabled?
:
: Mike

Hi Mike,

Why do you want to know the path to PHP.INI? On a Windows
system, the path follows the following paths and if it does
NOT exist in the following paths, then you need a way to
point to the PHP.INI file.

..;%PATH%

Then Windows checks to see if the extension (.ini) gets
opened via the %PATHEXT% variable, then Windows checks to
validate if the extension (.ini) gets opened by any other
application via one or more keys in the registry.

You can use regedt32.exe to validate which application (or
program) opens the .ini extension by looking in this key:

HKEY_CLASSES_ROOT

The HKCR key does nothing more than providing a way for a
default application (program) to open files with such an
extension. Many times people use NOTEPAD.EXE to open the
file, so just because a default application exists, does
not mean that the application EXECUTES the file opened.
NOTEPAD just reads the file and presents the text it finds
in it without trying to process any of the information as
anything but text.

The list goes on and it's been a while since I pursued
this topic. So let me know if this helps at all. I do
not know about the ways LINUX searches for the .ini file,
so I shall continue to watch this topic to see if others
add anything.

Thanks.

--
Jim Carlock
http://www.facebook.com/jim.carlock
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: regexp
Next Topic: summing an array of arrays
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 18:28:31 GMT 2024

Total time taken to generate the page: 0.03755 seconds