Simon wrote:
> It may be because you appear to be trying to run the script from your
> server's document root directory.
If it works, then probably it's as well to carry on the way it is now,
but if memory serves the normal PHP handler shouldn't need any of that.
CGI scripts need execute permission to invoke their interpreters, but
the PHP interpreter is invoked by Apache so PHP scripts need only be
readable. Although there are security advantages to segregating them
like CGI scripts, PHP files were intended to live in the document space
with the static content.
That said, I really don't know what was causing your problem before.
As for getting it to start automatically, are you sure it isn't already?
Try `netstat -at` after a fresh boot to see if something is listening on
'www'.
If not, look for directories called /etc/rc{n}.d, for various {n} being
the runlevels your system will do. These contain symlinks to the scripts
in /etc/init.d and determine which services are started/killed when
entering/leaving different runlevels. Either the installer didn't put
the links in, or it made them for the wrong runlevel.
You can probably use `who -r` to check your current runlevel (or
`runlevel` as root). Use update-rc.d to make the links in the proper
formats: check its man-page for options you might want.
Hope that helps,
Matthew