-
October 18th, 2006, 10:53 AM
#1
problem when mixing session in PHP with ajax
dear all,
i just start my way to learn AJAX
i am using a simple framework
AJAXGOLD.JS
i am tryin to make an application that combine the use of AJAX with session in PHP. but i got this message, when i do the 'session'-ing
this is the warning.
Code:
Warning:
Cannot send session cache limiter - headers already sent
(output started at c:\apache\htdocs\ajax\lat2_ajaxgold\chat.php:3) in
c:\apache\htdocs\ajax\lat2_ajaxgold\chat.php on line 6
if there is any idea of how to handle session + AJAX,
or give the links, i'd be very thankful
rgrds,
szpilman
Last edited by szpilman; October 18th, 2006 at 10:59 AM.
Reason: view of the warning is too wide not so
-
October 21st, 2006, 12:28 AM
#2
Re: problem when mixing session in PHP with ajax
When I call the function session_start() but before calling it some thing is going to be print on browser then this warning shown. For example
Code:
<html>
<?
if(!isset($_SESSION))
session_start();
?>
</html>
This will show a warning!
But following code will not show warning:
Code:
<?
if(!isset($_SESSION))
session_start();
?>
<html>
......................
</html>
Muhammad Waqas Badar
-
October 21st, 2006, 11:06 AM
#3
Re: problem when mixing session in PHP with ajax
thnx Badar
u got it right. i have corrected my code. some of the errors were also caused by incompatibilities in PHP functions that i used in my PHPTriad but i have resolved it. thnx badar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|