How to configure PHP daemon?

I will write my first daemon in php, and I have a couple of really basic questions that I need help with.

  • What packages should be installed on my Linux server and should anything be included in PHP? So far I got this - http://pear.php.net/package/System_Daemon/download

  • Where on the server do I save my daemon?

  • I have a number of files that need to be included within the daemon, which contain classes and functions for collecting email and attachments via IMAP. All these files are currently in my shared web directory, how do I include these files in my daemon?

I think this is all I need to get started. Many thanks!

+5
source share
1 answer

As long as your php installation includes sockets , you can write any daemon. Most modern php packages provide socket support. You need access to the shell in order to be able to configure and execute your daemon, this will not be done by serving it as a web application.

I don’t know about the package you mentioned, but most likely it will help you write and maintain your demon more easily.

  1. Where on the server do I save my daemon files?

, , , root, 1024. , , , , .

  1. , , IMAP. , ?

, ini, PHP .

:

+5

All Articles