Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 633
  • Last Modified:

Global.asa in PHP

Hello Experts

Does PHP hava a "global.asa" file as in ASP?

I just need to set one session variable's value at Session_OnStart

Thank you
0
APD_Toronto
Asked:
APD_Toronto
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
No, it does not.  In addition, PHP sessions are completely separate from ASP sessions on IIS.
0
 
APD_TorontoAuthor Commented:
But how would i initiate a var in PHP, regardless of what page is accessed first?

By the way, does asp aspx share same sessions?
0
 
Dave BaldwinFixer of ProblemsCommented:
"But how would i initiate a var in PHP, regardless of what page is accessed first?"

You have to include it in every page that needs it.  There are no automatic variables in PHP.

"By the way, does asp aspx share same sessions? "

Don't know.  Apparently not because this article tells you how to do it.  http://msdn.microsoft.com/en-us/library/aa479313.aspx
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Loganathan NatarajanLAMP DeveloperCommented:
I used to put common things (which to be loaded while apps start)  in the config-load.php file and it could be included in all the pages so that it is accessible to do.
0
 
Ray PaseurCommented:
For shared data between ASP and PHP (or CF, for that matter) a shared file on the server may make sense.  I have seen ASP and PHP both use an MSSQL data base, so that may be a way of sharing session information, too.
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
depending on what that data is, can you just set a cookie on the clients computer when the first visit that site that contains the data you want? again, this all depends if the data is sensitive or not.

as for sharing sessions between asp and aspx pages, it CAN be done, although its kind of tricky to implement. you'd be better off sharing that data between a database table that both apps have access to
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now