I believe that neither of these methods are working. For starters, I am calling session_start() at the top of every page of my current project. When I declare a variable and use session_register(), I can't access it on the next page. Like so:
$var = 'someVal';
session_register("var");
When I go to the next page and try print($SESSION['val'];, it outputs nothing. Just a blank space. But if I do this on the previous page, it works just fine:
$var = 'someVal';
$_SESSION['val'] = $var;
I can access the variable on the next page fine. So what gives?
Also, I believe that error_reporting isn't working. Right after my call to session_start() on each page, I call error_reporting(E_ALL); to output any errors to the page (I'm still in development, so none of this is live). Well, I have one page that is a rather long script. I was having some issues getting it to work last night, and I had to copy/paste my code almost line by line to find out which line was giving me problems, because more often than not, when the page was accessed, it was completely blank. A look at the source through the browser simply showed "<html><body></body></html>". So I'm guessing that there is a problem somewhere in the document with my php code, thus causing it not to compile and sending a blank page to the browser.
But I'm calling error_reporting(E_ALL), so if there were any syntax errors, it would tell me, wouldn't it?
Now, I did check phpinfo() and saw that display_errors was set to Off. So I went into php.ini and set it to On, but my system is restarting, so maybe that will fix it. But if not, what's going on?
If there's any more info I can give you, let me know. This is kinda frustrating.
James
EDIT: Okay, modifying the php.ini file worked, it just showed me an error. But the whole session_register thing still has me confoosed.