You know, I have been building some large web applications over the past 2 years and have never given this much thought, but now I am not sure if I did something that is "taboo" in the php professional world. Perhaps someone could tell me if what I did is perfectly acceptable without ill-effect.
For most of the pages throughout these applications, I have a header file that is included in each and every php file. That header file includes:
And of course, each page has a footer file included that says (amongst some other things):
Is this a bad thing to start a session on every page? Some of the pages use the sessions and that is why I have it in there, but for the most part I'd say 70%+ of all the pages don't utilize any sessions. Does it hurt to have the session opened in all these "non-session using" php pages? Or does it not make a difference one way or another? I just don't want to unnecessarily make my server work harder than it has too, even though my server is more beefy than I need.
Any advice or suggestions on this would be greatly appreciated! Thanks!