Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Tracking down a problem: Apache, PHP, MySQL and Includes |
|
Author |
|
Galaxy_Stranger
Joined: 05 Aug 2008 Posts: 5
|
Posted: Tue 05 Aug '08 23:46 Post subject: Tracking down a problem: Apache, PHP, MySQL and Includes |
|
|
I've been making a web page that uses PHP session variables for user logins. I've organized it so that each page 'includes' the menu which displays its content based on the user login session variable. So, for example, the index page uses virtual() to include the menu code.
The login scripts all work and give me back session variable values correctly, but the 'included' menu code isn't receiving the new session variable values.
Last night at about 5:30am - it miraculously decides to work! 5 minutes later - it stops...
Because it worked for a time, I know the scripts work correctly. At the time, I had restarted Apache after looking at the config file. Would there be any setting in Apache that would keep this included code from having access to session variables? |
|
Back to top |
|
Galaxy_Stranger
Joined: 05 Aug 2008 Posts: 5
|
Posted: Wed 06 Aug '08 6:12 Post subject: asdfasdf |
|
|
Just in case anyone's interested - I found out what my problem was:
"session_start() ; " needs to be the FIRST element in the body of each web page when using virtual() to include content. Otherwise, session variables won't be accessible by all content. |
|
Back to top |
|
|
|
|
|
|