Re: where do you store app wide data?
From: worzel (asda_at_sdarta.com)
Date: 01/02/05
- Next message: Luigi Donatello Asero: "Re: SSL questions"
- Previous message: worzel: "Re: where do you store app wide data?"
- In reply to: Tommy Gildseth: "Re: where do you store app wide data?"
- Next in thread: Lunchbox G4: "Re: where do you store app wide data?"
- Reply: Lunchbox G4: "Re: where do you store app wide data?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 2 Jan 2005 10:47:13 +0800
Thanks Tommy - thats pretty much the answer I didn't want! But,
unfortunately, it seems to be the accurate one.
I guess I have been spoiled in this respect as CF and Java both let me do
this without even a second thought - PHP is making it a bit of an effort. I
think I will just stick with a file read/write for the simpler cases (off I
go now to learn more about locking issues in PHP) and perhaps look into some
DB mapping solutions that may allow me to map and unmap arrays and objects
into to and from database - I think serialiszing may be my next port of call
afater file locking. (Again, spoiled, used to Hibernate for this stuff)
Any pointers, other than the docs, in either of these areas would be useful?
Though I guess they may be 2 separate posts later if I dont get anywhere
fast on my own!
Cheers.
Andy
"Tommy Gildseth" <gildseth@start.no> wrote in message
news:cr7jr0$kfm$1@news.tdcnorge.no...
> worzel wrote:
>
>> In Java, there is an ServletContext object for storing app wide data. And
>> in coldfusion there is an 'application' scope. How is this done in PHP? I
>> know I could use a database or even a file, but this seems a bit much
>> trouble in the basic cases and lacking in the more complex cases. (ie;
>> storing entire objects or arrays etc).
>
> I'm a bit stumped at how so many can missunderstand this question, and
> suggest stuff like $_SESSION and whatnot, but the fact is, that PHP does
> not have support for application wide variables, or server variables if
> you
> like.
> It is however possible to do, and it's not all that hard to create your
> own
> library functions for doing something like this.
> The Shared memory functions (http://no2.php.net/shmop) is one option, if
> you
> want to implement something like this.
>
> --
> Tommy
>
- Next message: Luigi Donatello Asero: "Re: SSL questions"
- Previous message: worzel: "Re: where do you store app wide data?"
- In reply to: Tommy Gildseth: "Re: where do you store app wide data?"
- Next in thread: Lunchbox G4: "Re: where do you store app wide data?"
- Reply: Lunchbox G4: "Re: where do you store app wide data?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|