Application in ASP is there the same in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Application in ASP is there the same in php?

Post by pelegk2 »

thnaks i advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

huh?
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

ok
in ASP you have something that is called Application that is like a session but its global for all the users
and it lives for ever (or until u delete it)
is there something like that in php?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

use a database for persistant things.
User avatar
carlmcdade
Forum Newbie
Posts: 24
Joined: Thu Dec 02, 2004 2:19 am
Location: sweden

Post by carlmcdade »

pelegk2 wrote:ok
in ASP you have something that is called Application that is like a session but its global for all the users
and it lives for ever (or until u delete it)
is there something like that in php?

Nope, I was complaining about this in another thread. I miss being able to set global.asa, application start and stop. There is no equivalent in PHP 4 and to be able to get the same functionality with Public, Private and Protected you have to go to PHP 5.

I really don't like PHP sessions in that you have to declare the start on a page by page basis and there is no global.asa. Now that I think about it PHP sessions behave more like ASP Application than actual sessions because of this.


viewtopic.php?t=28924
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can set php to auto-start sessions... ;)
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

what do u mean by "use a database for persistant things"?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

pelegk2 wrote:what do u mean by "use a database for persistant things"?
if you want to permanently store something, put it in a database
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

yes i understand that
but it means ojn every visitor to access the db\!\1
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

and that's a bad thing? do you know how many database requests go to the database per page of this forum alone? It's more than 10.. I can tell you that.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

ok:)
Post Reply