I'm having trouble getting my PHP scripts to run. My server is configured to
run PHP as CGI w/ suexec. I had PHP going once before, but I lost my files, and
I can't remember what I did the first time. My host is strictly "no support."
Here's all they have to say about PHP in their FAQ:
"How do I use php?
You use it just like any other CGI script. The path to the php binary is
/usr/local/bin/php. It does not run as a module, it runs as a CGI. It runs via
suexec, so don't set group/other write on the script, or it won't run. It also
has to be set executable, and you'll need to print out the "Content-type:"
header (as well as any others you want to use) at the top, just like you would
for a CGI."
Right now I have my .php files in my website's root directory, with permissions
set to owner read/write/execute, group read, others read. I have a path
statement:
#!/usr/local/bin/php
as the first line in each file. What else could I be missing? Do I need to
create a cgi-bin directory, and put my scripts in there? Any ideas?
Matt O.
run PHP as CGI w/ suexec. I had PHP going once before, but I lost my files, and
I can't remember what I did the first time. My host is strictly "no support."
Here's all they have to say about PHP in their FAQ:
"How do I use php?
You use it just like any other CGI script. The path to the php binary is
/usr/local/bin/php. It does not run as a module, it runs as a CGI. It runs via
suexec, so don't set group/other write on the script, or it won't run. It also
has to be set executable, and you'll need to print out the "Content-type:"
header (as well as any others you want to use) at the top, just like you would
for a CGI."
Right now I have my .php files in my website's root directory, with permissions
set to owner read/write/execute, group read, others read. I have a path
statement:
#!/usr/local/bin/php
as the first line in each file. What else could I be missing? Do I need to
create a cgi-bin directory, and put my scripts in there? Any ideas?
Matt O.
Comment