I'M running a site on PHP 5.2.6, Apache 2.2.9 (shared hosting). Most of the site uses a CMS (MODx) but I have one section using home-rolled scripts. I have a file that gets included into these that checks user status by looking for the MODx session vars. On one script, this works fine. Another script can't see the session vars. Huh?
The script that works fine is a public web page. If you have admin privs, one mode of this page presents a form for various page settings. This all works fine (including checking that you have those privs). The form's submit action calls the other script - saveinfo.php - which checks for admin privs (using those same MODx session vars) and saves the info to the DB before bouncing you back to the original page. This is the one that can't see the session vars. Because it assumes you're not logged in, it fails to save the info. This script is in the site's home (public_html) dir. The one that *can* see the sessions vars is one dir down.
I have exactly the same script working in an 'add-on' domain, which is effectively hosted in the same place, just one directory down. No problems at all there. I can't understand what the difference is.
I have commented out the' session_start()' commands that I used to use in these scripts because I understand PHP5 doesn't need them.
Any idea where I might start looking for the problem? This one has me tearing my hair out, and I don't have a lot to spare.