About CLI PHP

From: Date: Mon, 15 Dec 2003 15:23:12 +0000
Subject: About CLI PHP
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-22545@lists.php.net to get a copy of this message
Hello, I think it would be a good idea to make the PHP usage within CLI something different than PHP usage with a web server. I mean that users often get confused when I say, for example, my FTP server is 100% pure & native PHP. They think about things like phpMyExplorer, etc... and they don't even think that it is possible to do a whole multi-child FTP server with PHP. It's maybe too early but I think it would be a good idea to make a separate website (like for pear, gtk, ...) about this usage of PHP. Users using php from a console will probably confuse users starting php on some free hoster to try to make dynamic content. About 4 years ago, I wrote some code for PHP to run perfectly with xinetd (using xinetd's environement to find remote ip, remote port, ...) and I called that PHP/NC (I forgot what NC mean). With that, I created the first POP/SMTP server in php (storing mails in a MySQL database ... yes it was a big mistake... much slower than files when you have big mails). Now I use a little thing I wrote called phpinetd: it will listen to ports using the socket_* functions, and run functions when a command is received. It supports TCP and should work with UDP, also it have two "cores": one for UNIX system, using fork() and one for other systems, which isn't forking at all and using select() to run only when needed. I think this software may help people starting doing their first "PHP Daemon" outside Apache (I also use two classes I wrote : tcpsocket and udpsocket. It makes really easy creating a socket, listening, sending data, etc..) and I'm still improving it (but keeping a backward compatibility). I think the best would be to include that near php.net . Using sourceforge is also an option but I don't feel like it would be the best. That's why today, I'm writing to you :) Regards, MagicalTux -- FF.ST NetworK IRC Services and more

« previous php.mirrors (#22545) next »