Entry
I don't have any php.ini file in windows dir,but still it works fine why is so?
Mar 4th, 2005 03:51
TeraZen, umesh shastry,
You PHP path is defined correctly, so it finds the php.ini in your
C:\php folder, for example...
But since it works, you shouldn't care ;-)
*Quote from PHP installation file*
PHP searches for php.ini in the following locations (in
order):
* PHPIniDir directive (Apache 2 module only)
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath
* The PHPRC environment variable
* Directory of PHP (for CLI), or the web server's directory (for
SAPI modules)
* Windows directory (C:\windows or C:\winnt)
If you are running Apache 2, the simpler option is to use the
PHPIniDir directive (read the installation on Apache 2 page),
otherwise your best option is to set the PHPRC environment variable.
*End quote
Clarification; I've seen somewhere that PHP use a "default"
configuration in the case it don't find any php.ini (Also, I've tested
PHP without any php.ini, and it works without problems). But if you want
to use, for example, session_vars or the smtp function, you *must* have
a php.ini file. Also, it is recommended to use one, for security purposes.