I have been trying to develop an AJAX request using a "comet"
architecture. (A long-polled HTTP request). Here's the problem:
If I develop the script within an action of the controller it halts
other requests to the cake infrastructure. I believe it is because of
the php output buffer, but am not 100% sure. I have no idea why it
does this, and cannot seem to do a work around.
In it's basic form (pseudo):
<?
class myController extends AppController {
function comet() {
while( condition ) {
// do stuff
sleep(1);
}
// render view (json)
}
}
?>
If you were to request http://example.com/my/comet/, it would lock out
any further requests until the script has finished.
If you do the same thing with a standalone PHP script, it is fine.
I think I am going bonkers trying to figure this out.
Few part question:
a) Am I missing something?
b) Is there a way around this?
c) What is the easiest way to bootstrap all the cake constants &
sessions to a standalone script.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---