Warning: session_start() [function.session-start]: Cannot send session
Post Description: Warning: session_start() [function.session-start]: Cannot send session
Tags: Warning:, session_start(), [function.session-start]:, Cannot, send, session
This Post Was Posted On Feb 29, 2008 By web hosting #1177
Code:
so to fix it I moved the session_start() function from line 26 to line 2 on my header.php file.
That fixed it.
I am posting here just incase anyone else is getting it..
If you have benefited from this post, wallpaperama would appreciate a link back to wallpaperama.com - Thanks
if that's the case, then you need to check any of your includes, check for any blanks or white spaces on line one of any of the files, if you are getting this errors, its because you are sending some information to the browser before the sessionstart function. you just have to check and doublecheck, eventually, you will find it. it happened to me, i went crazy trying to find it, but eventually, i found it. just remember, you can't have anything before sessionstart
you can also get more help at:
http://www.php.net/manual/en/function.session-start.php
Description
session_start() creates a session or resumes the current one based on the current session id that's being passed via a request, such as GET, POST, or a cookie.
If you want to use a named session, you must call session_name() before calling session_start().
session_start() will register internal output handler for URL rewriting when trans-sid is enabled. If a user uses ob_gzhandler or like with ob_start(), the order of output handler is important for proper output. For example, user must register ob_gzhandler before session start.
Notes
Note: If you are using cookie-based sessions, you must call session_start() before anything is outputted to the browser.
as you can see, even the official php site says you must call session_start() before anything you send to the browser, that includes white spaces. white spaces are hard to find, because you can't see them, you have to look for them
i removed the extra "session start();" from the page and removed the extra header lines from the page expire .php,so it woring fine.
warning: session_start() [function.session-start]: open(/var/tmp/sess_519142a978e7bec6c052145fa892aca3, o_rdwr) failed: permission denied (13) in /mnt/web1/22/58/51474058/htdocs/kd/korenicajomla/joomla_1.0.13-stable-full_package/includes/joomla.php on line 800
warning: session_start() [function.session-start]: cannot send session cookie - headers already sent by (output started at /mnt/web1/22/58/51474058/htdocs/kd/korenicajomla/joomla_1.0.13-stable-full_package/includes/joomla.php:800) in /mnt/web1/22/58/51474058/htdocs/kd/korenicajomla/joomla_1.0.13-stable-full_package/includes/joomla.php on line 800
warning: session_start() [function.session-start]: cannot send session cache limiter - headers already sent (output started at /mnt/web1/22/58/51474058/htdocs/kd/korenicajomla/joomla_1.0.13-stable-full_package/includes/joomla.php:800) in /mnt/web1/22/58/51474058/htdocs/kd/korenicajomla/joomla_1.0.13-stable-full_package/includes/joomla.php on line 800
this error i have in administration panel
warning: session_start() [function.session-start]: cannot send session cache limiter - headers already sent (output started at /home/admin/public_html/zaid/htpre/userclass.php:62) in /home/admin/public_html/zaid/htpre/sessiondata.php on line 28
this is the sessiondata.php and the error in
if ($sid == "") {
session_start();
$sid = session_id();
} else {
session_start($sid);
}
warning: cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/mypage_add.php:4) in /home/mydomain/public_html/mypage_add.php on line 72.
the following are the codes:
71: if ($resultpage){
72: header("location:detail.php?name_id=$name_id#p$page_id");
73: exit();
74: }else{
what seems to be the problem?
tcpdf error: some data has already been output, can't send pdf file
error: [2] cannot modify header information - headers already sent by (output started at /home/allkindt/public_html/shared/config/tce_db_config.php:180) | line: 2409 | file: /home/allkindt/public_html/shared/code/tcpdf.php
tcpdf error: some data has already been output to browser, can't send pdf file
i face this problems to create pdf file
error: [2] session_start() [function.session-start]: cannot send session cache limiter - headers already sent (output started at /home/allkindt/public_html/shared/config/tce_db_config.php:180) | line: 190 | file: /home/allkindt/public_html/shared/code/tce_functions_session.php
error: [2] cannot modify header information - headers already sent by (output started at /home/allkindt/public_html/shared/config/tce_db_config.php:180) | line: 191 | file: /home/allkindt/public_html/shared/code/tce_functions_session.php
hi i face this problems..please give me a better solution....thanks..byeee
Powered by: Webune Forums V3