Re: where do you store app wide data?

From: worzel (asda_at_sdarta.com)
Date: 01/03/05


Date: Mon, 3 Jan 2005 08:47:52 +0800

re:
> I think my point really was, that it probably doesnt exist because there
> isnt a need for it as such.

There is definitely a need for it if PHP is to be taken more seriously by
the enterprise folk. But then again, maybe this isn't a goal of PHP?

"Andrew Bullock" <trullockNO@SPAMyahoo.com> wrote in message
news:YQVBd.113$tF3.77@newsfe5-gui.ntli.net...
> Oli Filth wrote:
>> worzel wrote:
>>
>>> Thanks -feel like I am talking in a foriegn language here!
>>>
>>> Hang on, I suppose thats exacctly what I am doing!!
>>> I think some concepts seem obvious to me that are not handled the same
>>> way in PHP world. Maybe this is why I think I am being clear enough, but
>>> obviously not the case.
>>>
>>> I have to say at this point that if this concept is not even implemented
>>> and the concept is not even an issue that is understood as something
>>> that is lacking - then I am beginning to wonder why PHP is praised so
>>> well for being a web app development platform. I thought there was a lot
>>> more to it than it simply being free.
>>>
>>> I have heard though that many go throuh an initial dislike before they
>>> see the better side of it - I am yet to get there.
>>>
>>
>> I think the reason most people are not understanding the problem and
>> saying "use SESSION!!!" is because it's not a concept that PHP developers
>> face. For most PHP developers, if they want to share data between users,
>> they just use flat-files or a database (PHP has good support for MySQL,
>> etc.), and so the concept of "application-wide" would have no relevance
>> to them.
>>
>> AFAIK, there is no native PHP support for cross-session data. You made
>> the comparison with Java Servlets, AFAIK servlet instances all run in the
>> same process, and so it would be easy to share data. I don't think this
>> is the case with PHP modules.
>>
>> I think the solution would be to use serialize() and unserialize(), and
>> use a file/DB to store the results. With these functions, you can keep
>> data structures intact.
>>
>> Oli
>
> Im not just blindly shouting "USE SESSIONS".
> I agree with both of you, that not coming from a JAVA background, I am
> missing what "application wide" data is.
>
> As someone said in an earlier post, there is no specific support for
> storing data at runtime other than a global variable, without writing a
> custom library function.
>
>
> I think my point really was, that it probably doesnt exist because there
> isnt a need for it as such.
>
>
> Andrew



Relevant Pages

  • Re: Bynums progress & call for predictions
    ... and your boy the bust doesnt have the ... he isnt faster, he is bigger, he isnt more explosive, and this kid ... he cant shoot it... ... the bust is still getting his shit thrown out of the gym ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: Bynums progress & call for predictions
    ... film on him and actually starts to game plan for him a little. ... gets ripped because he isnt looking... ... doesnt match up with what youre thinking... ... his post defense this year, ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: Fighting junk mail, one envelope at a time
    ... printing junk, transporting it to its recipients, and disposing ... Doesnt happen here. ... carrier is spared the walk up our porch stairs at least once a week. ... No it isnt. ...
    (misc.consumers)
  • Re: Addslashes / Stripslashes
    ... They are now running PHP 4.4.1. ... how its not too hard to write a sql script and save it as a .jpg i ... Well im still doing both functions but it doesnt seem to be working ... I never study binary representations of images. ...
    (comp.lang.php)
  • Re: Addslashes / Stripslashes
    ... They are now running PHP 4.4.1. ... Well im still doing both functions but it doesnt seem to be working ... the addslashes() doesnt match the number of bytes returned from the ... and seeing as how the binary content of an image file is pretty strange ...
    (comp.lang.php)