Avatar of APD Toronto
APD Toronto
Flag for Canada asked on

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
ASPPHP

Avatar of undefined
Last Comment
Big Monty

8/22/2022 - Mon
Dave Baldwin

No, it does not.  In addition, PHP sessions are completely separate from ASP sessions on IIS.
APD Toronto

ASKER
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?
Dave Baldwin

"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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Loganathan Natarajan

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.
Ray Paseur

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.
ASKER CERTIFIED SOLUTION
Big Monty

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question