You are here: Re: PHP is looking for php.ini file in c:\windows « PHP Programming Language « IT news, forums, messages
Re: PHP is looking for php.ini file in c:\windows

Posted by otrWalter on 07/12/06 19:08

~john wrote:
> As the installation txt suggests, I have left my php.ini file inside
> the c:\php directory... but running phpinfo() shows that my php.ini
> file is in c:\windows as shown below.
>
> Configuration File (php.ini path) - C:\WINDOWS

Please do as "Paul" suggests...

>use the environment variable PHPRC.

Be sure to restart your PC, since Apache needs to read this env var
after each PC start.

Don't ask, I can't stand it either.


> Well there is no php.ini file in my windows directory,

As it shouldn't!!!

And on your note of...

> "Please note that the SetEnv PHPRC "directory/to/phpini/" only works
> when using PHP as CGI"

Sorry John, this is not correct. Use that ENV VAR.

And Peter, no need to use the registry! I have a complete "linux" type
install with PHP, Perl, mySQL, Apache, all without ANYTHING in the
WINDOWS nor anything in the REGISTRY. (web.torres.ws/walters_way)

And as for the "instructions in the official PHP download", I never
worry about those. So many times they are written by WINDOW-centric
folks, with no thought to installation, backup, maintiance, etc. They
do it the "Windows Way".

I have a complete set of install documents on how set up a PC for PHP
(and other apps) with complete disregard for "The Windows Way".

In regards to Jerrys advice of leaving things in the WINDOWS directory.
All well an good, but, back your system up, replace your OS (from
scratch) and then restore Apache, PHP, Perl, and mySQL less than 10
minutes. Not.

And as for "ImOK' advice on the PATH, don't touch it, unless your going
to use PHP from the command line. (which I do from time to time). IF
you do than I suggest placing this in the PATH var...

;%PHPRC%

That way to change the path in one place and it cascades across as
needed.

Hope this helps you.

PS: I have virutal hosts running on my PC for Apache as well. Helps me
test things better.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация