NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP server app

Joel De Gan joel at tagword.com
Sun Apr 4 01:26:39 EST 2004


On Sat, 2004-04-03 at 23:58, felix zaslavskiy wrote:
> > Anyone have experience running a constantly running 'server' app based on
> > php from a linux server?
> >
> 
> There is nothing that techincaly stops php being used that way.
> There is sockets api's extensions. I dont know which is most stable though.
> 
> Memory leaks may be a problem.  You can certainly do it but be prepared to
> restart the thing daily.

Not so, at least not now:
http://www.php.net/ChangeLog-4.php#4.3.5
I have had php server/client apps that have run for over a hundred days, and one of those 
was a forked mailserver I wrote I called honeymail (see http://lucifer.intercosmos.net/index.php?view=honeymail for
incomplete source, I never have released the source in full as it was never finished to where
I wanted it to be).
Another I have written is a bot that scours the soulseek network and populates soulreactor.com..
(but I have not been keeping up on that recently as that one hogs resources as translating peoples 30,000
MP3 collection has a tendency to take up a lot of memory. It ran for two months solid with no problems.)
The main issue with people having to restart is that they are not utilizing posix functions.
http://us3.php.net/manual/en/ref.posix.php and are trying to run an app in linear mode vs forked mode
(such as how apache and mysql run).
Anyway, PHP works just fine for a server apps, it not the "preferred" choice for most, but for me, I like it.
-Joel De Gan







More information about the talk mailing list