This is a discussion on Alternate location for php.ini within the PHP Language forums, part of the PHP Programming Forums category; Is there a way to set php.ini to the alternate location? I'm trying to use 2 version of ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Artco News <artconews@verizon.net> wrote:
> Is there a way to set php.ini to the alternate location? > > I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the > way. Anyone knows how to circumvent this issues? Perhaps there is an env > variable we can set. http://uk.php.net/manual/en/configuration.php Second paragraph. JOn -- You cannot propel yourself forward by patting yourself on the back. |
|
|||
|
Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I
run the phpinfo() it still look at my C:\WINDOWS directory. I did the above definition and stop/start the apache2 and still no go. Any idea where should you look. Thanks a bunch. "Andy Hassall" <andy@andyh.co.uk> wrote in message news:okvfqv8gu9tdut1e23ink3j616jcb1q34b@4ax.com... > On Tue, 04 Nov 2003 19:09:57 GMT, "Artco News" <artconews@verizon.net> wrote: > > > >I did set the PHPRC(c:\php\config) env var as well as > >PHP_INI(c:\php\config\php4.ini) env var but still no go. > > PHPRC certainly works, I'm using it right now. > > FWIW I used / instead of \, i.e. d:/php > > Also make sure that your web server actually gets PHPRC in its environment; it > may be different from yours, particularly if it's running as LocalSystem > instead of a named user. > > -- > Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <artconews@verizon.net> wrote:
>Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I >run the phpinfo() it still look at my C:\WINDOWS directory. > >I did the above definition and stop/start the apache2 and still no go. Any >idea where should you look. Thanks a bunch. As a module under Apache2. The Apache service will run as a child of SERVICES.EXE; unless you restart that it's not going to see the new environment. Rebooting is a fairly sure way of getting it to restart. ;-) -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
I follow your lead and still no go.
First I remove/rename c:\windows\php.ini Then I created a directory: c:\apps\php\config\php.ini Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And no luck as well. I also rebooted my machine. Any ideas. Oh, BTW, I'm running php-4.3.4RC1 "Andy Hassall" <andy@andyh.co.uk> wrote in message news:vj1gqvset94a2dppso8drn8l7fq4gg6n7a@4ax.com... > On Tue, 04 Nov 2003 19:58:45 GMT, "Artco News" <artconews@verizon.net> wrote: > > >Are you using in CGI mode or SAPI mode? I'm using the SAPI mode. So, when I > >run the phpinfo() it still look at my C:\WINDOWS directory. > > > >I did the above definition and stop/start the apache2 and still no go. Any > >idea where should you look. Thanks a bunch. > > As a module under Apache2. > > The Apache service will run as a child of SERVICES.EXE; unless you restart > that it's not going to see the new environment. Rebooting is a fairly sure way > of getting it to restart. ;-) > > -- > Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <artconews@verizon.net> wrote:
>I follow your lead and still no go. > >First I remove/rename c:\windows\php.ini >Then I created a directory: c:\apps\php\config\php.ini >Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And no >luck as well. It's PHPRC, not phprc. Is the server picking it up in the environment? Echo out $_ENV['PHPRC'] in a script. If not - where did you set it? -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
Thanks, that did it. When in doubt, REBOOT!
Thanks a bunch. By the way, I was trying to install the latest snaps of PHP5 beta2. I had no such luck. Perhaps you can give me some pointers. I did exactly what the install.txt said but still got the following error: The Apache service named reported the following error: >>> Cannot load X:/Apps/php/php5/php4apache2.dll into server: The specified module could not be found. . For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. "Andy Hassall" <andy@andyh.co.uk> wrote in message news:ut5gqvclomioi9noiba18p737s1584095a@4ax.com... > On Tue, 04 Nov 2003 21:14:14 GMT, "Artco News" <artconews@verizon.net> wrote: > > >I follow your lead and still no go. > > > >First I remove/rename c:\windows\php.ini > >Then I created a directory: c:\apps\php\config\php.ini > >Then I set envar phprc=c:\apps\php\config(then c:/apps/php/config). And no > >luck as well. > > It's PHPRC, not phprc. > > Is the server picking it up in the environment? Echo out $_ENV['PHPRC'] in a > script. > > If not - where did you set it? > > -- > Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |