Solved

Global.asa in PHP

Posted on 2013-01-03
6
556 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 82

Expert Comment

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

Author Comment

by:APD_Toronto
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
"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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 36

Expert Comment

by:Loganathan Natarajan
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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 32

Accepted Solution

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 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

8 Experts available now in Live!

Get 1:1 Help Now