Re: PHP refuses to look in the areas I tell it to for its php.ini file, why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



v0id null wrote:
> The issue? Neither PHP's seem to be able to find php.ini and for some
> really stupid reason, neither of the PHPs seem to really care. I don't
> even know how PHP is running without its php.ini file, especially

If PHP can't find a php.ini file, it uses the defaults set up when it was
compiled, and the same values as if it had found the default php.ini file
that comes with the distribution.

> since its able to load extensions even though, according to phpinfo,
> it's trying to find extensions in directories that don't even exist!

The extensions it is finding or not finding in the directories that do or
don't exist are pre-set by compiled-in default-values-for-no-php.ini
values.

Windows being windows, DLLs that live "next to" php.exe (or the php4ts.dll
or whatever the hell it is) may be automagically "found" by the Windows
OS...  At least, that's how I've understood Windows to work...  Actually,
with the DLL setup, I guess it would find any DLLs sitting in the same
directory as apache.exe...

You could drive yourself crazy trying to figure out which software
(PHP/Apache/OS) is looking for what where.

> I've added both php's directories into my PATH enviroment variable in
> windows, I've added SetEnv PHPRC C:/php in httpd.php4.conf (obviously
> the apache conf file for php4) and that does nothing for PHP4. I
> haven't tried anything for PHP5 because on the immediate side of
> things, its not important.

Don't know nothin' bout no SetEnv PHPRC...  Is that documented in the
manual?...

> PHP4 is looking for php.ini in c:\WINNT, and its not there. There is

So put one there, and life will be good.

The setting for C:\WINNT is compiled into the PHP binary (.exe or .dll)
and that's pretty much where you need to put php.ini if you want it to
work...

Though if you get that SetEnv thing working, and it's a documented
feature, more power to you.

> nothing of PHP's files inside any windows directory, no dlls, no ini
> files, nothing. Everything is contained in PHP's own directory, which,
> so it seems, is reading it partially.

Again, that might be Windoze "finding" the DLLs more than PHP -- There is
a whole set of rules for Windoze and DLL loading and whatnot that I've
long purged from my brain.  I think it's even documented somewhere on
Microsoft's site...  Good Luck!

> Any help anyone could offer would be GREATLY appreciated,

With any luck at all, your php5 install is looking for php.ini in a
different directory...

Use phpinfo() to determine where it thinks the file should be.

PS:  phpinfo() will output something 'odd' when there is no php.ini file
to be found as opposed to when it found one in the directory where it
looks.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux