0

I'm using php 5.4.7 and in my every development day basis i have to run php built in server like 100 times a day most times for the same project i want to know is there any way to write a php program that runs as a deamon on gnu-linux-ubuntu.13.04 and writes log information to a certain file.

I want to just once run this command:

php myserver.php --host="localhost" --port="8000"

then close the terminal and have the server up for the rest of the day. Any suggestions?

  • If you need if often, consider `supervisord`. Easy starting & stopping, automatic restarting on failure, etc. – Wrikken Jan 13 '14 at 13:49
  • sound similar to http://stackoverflow.com/questions/6464295/how-can-i-test-perfornamce-of-php-project-using-apache-benchmark – codepiper Jan 13 '14 at 13:51
  • @codepiper it seems that question is about benchmarking with apache. – Morteza Edalati Jan 13 '14 at 13:53
  • If you just want to close the terminal and leave it running, you could use `nohup` to invoke the command. – arco444 Jan 13 '14 at 13:58
  • Why not just use apache? Seems like it would make things easier than trying to reinvent a web server using the php built-in web server. – elitechief21 Jan 13 '14 at 13:59

0 Answers0