Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag 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
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

No, it does not.  In addition, PHP sessions are completely separate from ASP sessions on IIS.
Avatar of 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?
"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
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.
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
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial