Quote:
quote:Originally posted by CFerthorney
PHP is case sensitive and header was written as Header, as was Location. Also !== true, as far as I am aware (And I may be wrong) is invalid syntax in PHP. it is true that "==" tests for equivalence, but I don't think that you can use it with the not operand "!".
|
None of that is true.
Function names are not case-sensitive in PHP (Variables and Constants are).
The '!==' operator is valid, it means not identical whereas '===' means identical. This operator exists because '==' is a less strict comparison, e.g. not case sensitive, FALSE == 0 is TRUE.
See
http://www.php.net/manual/en/languag...comparison.php
AND
http://www.php.net/manual/en/types.comparisons.php
The latter shows contrasts and comparisons between the '==' operator and the '===' operator.
'Location' in the call to headers is most generally capitalized, but, this is not a rule.
Onto Knight's problem...
Warning: session_start(): open(D:\WINNT\PHP\sessiondata\sess_9ba6395c09f620f 8202e20f22f22ccab, O_RDWR) failed: Permission denied (13) in d:\inetpub\wwwroot\cutenews\ab.php on line 10
Well the error says permission denied. Therefore, you have a file permissions error. PHP does not have enough permissions to access the file. Is PHP installed in the WINNT directory? Have a look at this post:
http://p2p.wrox.com/topic.asp?TOPIC_ID=8169. If that post doesn't do anything to answer your questions then come back to us.
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at d:\inetpub\wwwroot\cutenews\ab.php:8) in d:\inetpub\wwwroot\cutenews\ab.php on line 10
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at d:\inetpub\wwwroot\cutenews\ab.php:8) in d:\inetpub\wwwroot\cutenews\ab.php on line 10
These are domino effect errors, output directly because of the first error.
Notice: Undefined index: logged_in in d:\inetpub\wwwroot\cutenews\ab.php on line 11
This one says $_SESSION['logged_in'] is not a defined variable. Perhaps you should use if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) isset() checks that it exists first.
Warning: Cannot modify header information - headers already sent by (output started at d:\inetpub\wwwroot\cutenews\ab.php:8) in d:\inetpub\wwwroot\cutenews\ab.php on line 13
Correct the last error about the variable not existing and this one will go away.
Warning: Unknown(): open(D:\WINNT\PHP\sessiondata\sess_9ba6395c09f620f 8202e20f22f22ccab, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (D:\WINNT\PHP\sessiondata) in Unknown on line 0
Again, another permissions error, do what the error says, check the session.save_path directive in php.ini and that PHP has permission to access the files in that directory.
hth,
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::