From the PHP help page on "session_register()"
"If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled."
I'm assuming since you compiled and installed PHP 5.0.4 that your "register_globals" is disabled. I wouldn't recommend enabling it to fix this problem. Instead use $_SESSION super global to register session data.
So instead of:
$_SESSION['username'] = $username; /* TO SET */ $username = $_SESSION['username']; /* TO GET */
Hope this helps,
Shawn Singh wrote:
I'm fairly new to PHP Programming. I have compiled and installed postgres version 8.0.1, and with that compiled postgres support into my postgres (I'm using PHP version 5.0.4), and I've compiled support for PHP into Apache (version 2.0.53) and all is working (in that I can embed PHP into my HTML documents and get the expected results).
I've written the code but when I try to login to the site I get this message:
Warning: Cannot modify header information - headers already sent by (output started at /export/home/www/htdocs/login.php:13) in /export/home/www/htdocs/login.php on line 25
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Information I've seen on the web for these types of messages would indicate that I don't have a /tmp directory, but such is not the case. Other messages have indicated that my session variables are not getting written to /tmp, but that is not true either, as I have seen them in there...as I see entries such as:
So, I'm guessing that there aren't problems with my /tmp filesystem.
Please excuse the lack of style as I have mainly been trying to hack out something, but plan to clean it up later.
My source code for the login page is as follows:
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php