I am new to PHP, and am encountering some problems with sessions while trying out my first session request...
Warning: Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/blah.com/httpdocs/blahtest/page2.php:8) in /home/httpd/vhosts/blah.com/httpdocs/blahtest/page2.php on line 10
What does this mean?
You need to have session_start(); at the top of your page, before any html output!
that was it.
Glad I could be of help! 😉
ah yes session_start but the error point to line contain session_start() though i don't have any html output . I just include a php file but its not contain any html code . So where is problem ? Please help me .
Just put the session_start(); before any includes. Just put it top of the page. And make sure you dont have any empty lines at the top of your page.
because i must use object with session so i must include a define class file before session_start . But i find out a way : use @session_start .. It's not show any warning and still run good.
Yes, but the @ sign is there to stop the warning messages. Just because they are not visable, doesn't mean the errors are not happening.