Solved

Global.asa in PHP

Posted on 2013-01-03
6
563 Views
Last Modified: 2013-01-08
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
Comment
Question by:APD_Toronto
6 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38742051
No, it does not.  In addition, PHP sessions are completely separate from ASP sessions on IIS.
0
 

Author Comment

by:APD_Toronto
ID: 38742308
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
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38742391
"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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 38742736
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
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 38746852
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
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 38751170
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now