Re: [PHP] global variables without sessions on apache
Thanks Jason, Works great in htaccess Zac - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 06, 2002 4:08 AM Subject: Re: [PHP] global variables without sessions on apache > On Thursday 06 June 2002 06:05, Zac Hillier wrote: > > Miguel, > > > > I mean that the variables will never change per Virtual host but that the > > site is a template for many sites and these vars are part of the > > distinction for each site / Virtual Host. > > > > So far the suggestions of using the auto-prepend in the php.ini have not > > seemed to cater for this. Can you help further? > > The auto-prepend thing can be set per-site if you put it in the apache.conf > file, and possibly per-directory as well (haven't tried it) if put in > .htaccess files. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > You will have a head crash on your private pack. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
On Thursday 06 June 2002 06:05, Zac Hillier wrote: > Miguel, > > I mean that the variables will never change per Virtual host but that the > site is a template for many sites and these vars are part of the > distinction for each site / Virtual Host. > > So far the suggestions of using the auto-prepend in the php.ini have not > seemed to cater for this. Can you help further? The auto-prepend thing can be set per-site if you put it in the apache.conf file, and possibly per-directory as well (haven't tried it) if put in .htaccess files. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You will have a head crash on your private pack. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
Miguel, I mean that the variables will never change per Virtual host but that the site is a template for many sites and these vars are part of the distinction for each site / Virtual Host. So far the suggestions of using the auto-prepend in the php.ini have not seemed to cater for this. Can you help further? -- ORIGINAL MESSAGE -- Is it possible using php on our own apache server to create global variables for virtual host without having to use session variables. We would like to have three variables that are constant for each virtual host and that are available from every page, I thought it would be possible with htaccess or http.conf but am struggling to find documentation for it. Thanks, Zac - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: "Zac Hillier" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 7:12 PM Subject: Re: [PHP] global variables without sessions on apache > On Wed, 5 Jun 2002, Zac Hillier wrote: > > Is it possible using php on our own apache server to create global > > variables for virtual host without having to use session variables. > > > > We would like to have three variables that are constant for each virtual > > host and that are available from every page, I thought it would be possible > > with htaccess or http.conf but am struggling to find documentation for it. > > When you say "that are constant" do you mean that they never change or > just that they are the same for each page at any given time? > > If you need dynamic variables shared between all your pages, you're going > to have to either use a database or shared memory as documented at: > >http://www.php.net/manual/en/ref.sem.php > > miguel > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
On Wed, 5 Jun 2002, Zac Hillier wrote: > Is it possible using php on our own apache server to create global > variables for virtual host without having to use session variables. > > We would like to have three variables that are constant for each virtual > host and that are available from every page, I thought it would be possible > with htaccess or http.conf but am struggling to find documentation for it. When you say "that are constant" do you mean that they never change or just that they are the same for each page at any given time? If you need dynamic variables shared between all your pages, you're going to have to either use a database or shared memory as documented at: http://www.php.net/manual/en/ref.sem.php miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
On Wednesday 05 June 2002 22:45, Zac Hillier wrote: > Could you expand on this a little more? I've tried searching for > auto-prepend in both php documentation and apache and cannot find anything > thats relates to our needs. In php.ini there is a setting called "auto_prepend_file". Set it to whatever file you want then in that file define your 'global variables'. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Banacek's Eighteenth Polish Proverb: The hippo has no sting, but the wise man would rather be sat upon by the bee. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
Jason, Could you expand on this a little more? I've tried searching for auto-prepend in both php documentation and apache and cannot find anything thats relates to our needs. Thanks for your help Zac - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 2:46 PM Subject: Re: [PHP] global variables without sessions on apache > On Wednesday 05 June 2002 20:40, Zac Hillier wrote: > > Hi, > > > > Is it possible using php on our own apache server to create global > > variables for virtual host without having to use session variables. > > > > We would like to have three variables that are constant for each virtual > > host and that are available from every page, I thought it would be possible > > with htaccess or http.conf but am struggling to find documentation for it. > > Use an auto-prepend file. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > QOTD: > "The baby was so ugly they had to hang a pork chop around its > neck to get the dog to play with it." > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
I'm not sure about at a htaccess level, but at a php.ini level I believe you can set a file to "always include" at the top of every php page. This file could simply be: Not sure on the specifics, but it was discussed on the list in the last two weeks, and i'm sure there is documentation for the php.ini file IN the the php.ini file, and on the website. Justin French on 05/06/02 10:40 PM, Zac Hillier ([EMAIL PROTECTED]) wrote: > Hi, > > Is it possible using php on our own apache server to create global variables > for virtual host without having to use session variables. > > We would like to have three variables that are constant for each virtual > host and that are available from every page, I thought it would be possible > with htaccess or http.conf but am struggling to find documentation for it. > > Thanks > > Zac > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] global variables without sessions on apache
On Wednesday 05 June 2002 20:40, Zac Hillier wrote: > Hi, > > Is it possible using php on our own apache server to create global > variables for virtual host without having to use session variables. > > We would like to have three variables that are constant for each virtual > host and that are available from every page, I thought it would be possible > with htaccess or http.conf but am struggling to find documentation for it. Use an auto-prepend file. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* QOTD: "The baby was so ugly they had to hang a pork chop around its neck to get the dog to play with it." */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] global variables without sessions on apache
Hi, Is it possible using php on our own apache server to create global variables for virtual host without having to use session variables. We would like to have three variables that are constant for each virtual host and that are available from every page, I thought it would be possible with htaccess or http.conf but am struggling to find documentation for it. Thanks Zac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php