Alternate location for php.ini

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-04-2003
Artco News
 
Posts: n/a
Default Alternate location for php.ini

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.

Thanks


Reply With Quote
  #2 (permalink)  
Old 11-04-2003
Jon Kraft
 
Posts: n/a
Default Re: Alternate location for php.ini

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.

Reply With Quote
  #3 (permalink)  
Old 11-04-2003
Artco News
 
Posts: n/a
Default Re: Alternate location for php.ini

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)



Reply With Quote
  #4 (permalink)  
Old 11-04-2003
Andy Hassall
 
Posts: n/a
Default Re: Alternate location for php.ini

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)
Reply With Quote
  #5 (permalink)  
Old 11-04-2003
Artco News
 
Posts: n/a
Default Re: Alternate location for php.ini

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)



Reply With Quote
  #6 (permalink)  
Old 11-04-2003
Andy Hassall
 
Posts: n/a
Default Re: Alternate location for php.ini

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)
Reply With Quote
  #7 (permalink)  
Old 11-05-2003
Useko Netsumi
 
Posts: n/a
Default Re: Alternate location for php.ini

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)



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0