Re: Set Global Variables

From: Date: Thu, 11 Apr 2002 20:02:30 +0000
Subject: Re: Set Global Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92654@lists.php.net to get a copy of this message
Keep in mind that there is no common memory space for all the users. Each request is being handled by a different process with its own memory space that's forked off of the original web server. (Assuming apache, I don't know how IIS works). -Steve On Thursday, April 11, 2002, at 01:52 PM, RRamirez@LifeFiles.com wrote:
If I do that, won't the data that I fetch be duplicated in memory for each user? I'm trying to have just one space in memory allocated for these variables, sort of like the HTTP_SERVER_VARS. It seems that even if I do an autoprepend that file is going to run each time a user visits the site and a new memory space will be created for that variable. What I'm asking is how to set those constant server-wide global variables. Thanks Roger -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@lerdorf.ca] Sent: Thursday, April 11, 2002 10:15 AM To: RRamirez@LifeFiles.com Cc: php-general@lists.php.net Subject: Re: [PHP] Set Global Variables Set up an auto_prepend file that either simply sets these constant globals ot fetches them from the DB. -Rasmus On Thu, 11 Apr 2002 RRamirez@LifeFiles.com wrote:
Is there a way to set a global variable that all users can access? I have some values in a database that I'm reading at the beginning of the session and carrying through out the session. The thing is, those values are the same for every user and instead of having a memory space for each users values I'd rather just use one memory space for all users. Thanks Roger Ramirez Web Developer LifeFiles.com Inc. -- 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


« previous php.general (#92654) next »