

Ask HN: What's the best way to do COMET in PHP? - cioc

What technologies would you use to create a COMET application, that scales well, in PHP?
======
clyfe
PHP is probably not a good choice for COMET because the required open
connection will block your server:

[http://stackoverflow.com/questions/603201/using-comet-
with-p...](http://stackoverflow.com/questions/603201/using-comet-with-php)

I guess this is the corner case one would use services like pusherapp.com

PS. Don't you like services that deliberately try to hide information from
you?

------
Limes102
I've used PHP for Comet a couple of times and I've never had a massive problem
with it.

The only thing I found was that the PHP sessions tended to lock the
connection, so if you tried to change page it would never load.
session_close() seemed to fix this pretty well.

Also, It's worth setting a time out because scripts often keep running in the
background if the connection isn't closed properly.

