Re: System wide variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, May 23, 2007 4:08 am, Darren Whitlen wrote:
> Stut wrote:
>> Darren Whitlen wrote:
>>> I have a PHP script that reads and updates either a small file or a
>>> mysql database. This script is called from several places every .5
>>> seconds.
>>>
>>> I would like to move this file to a variable for extra speed as the
>>> file  is causing a few problems being accessed so many times.
>>> Is it possible to have a writeable variable that has the scope of
>>> EVERY script that is run through the parser?
>>
>> Not really. Your options are basically 1) use the database instead
>> of
>> the file, or 2) try memcached (Google for it).
>>
>> -Stut
>
> Hmmm caching really isnt an option here as the data is always
> changing.
> Just a wild idea here.. would it cause major overhead if a script was
> to
> start a session, update some session vars, then switch to a common
> session_id that each script can access? Then use that session to store
> to my info.
> Would that cause any obvious problems?

The $_SESSION is coupled to the user/browser sending the ID back n
forth...

If you can hack things that run this script, I guess you could do
that, but all that does is use the file system that's already not
working, so I doubt it will help much.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux