Try turning on tracing to make the script tell you what it is doing at each step. You'll get lots of output, so I'd recommend capturing it using a script
session. Replace the first line of the script with
#!/bin/sh -x
and then run:
# script phpcgi-trace
# service phpcgi start
# service phpcgi stop
# ^D
The file phpcgi-trace
will contain a record of everything that the script tries to do. Search through it for clues as to why it's not dropping a pidfile.
EDIT
Note that the pidfile=
line in the rc script is there to tell rc
how to check the status of the controlled program, or how to stop it. It's not there to tell rc
to write a pidfile - that's the responsibility of the controlled program.
If phpcgi doesn't write a pidfile when it starts, the easiest thing to do is to just omit the pidfile=
line, and let rc
use the process name to check status, etc.