[PHP] php cgi configuration w/ htaccess

2003-10-20 Thread Andrew Warner
My ISP hosted website uses the php apache module version, but I'm 
trying to use php cgi version for the part of my site edit 
application that actually creates and edits files on the site. This 
will avoid all the permision and chmod hassle when php tries to 
create and edit files. My ISP has placed a php cgi binary in my home 
directory so it can run as my user id.

I've never used php cgi version, and all the httacces configuration 
I've tried to map .phpc files to the php cgi binary hasn't worked 
right.  I need an  example htacces file or an example of a script 
header line with php location.

drew


Re: [PHP] php cgi configuration w/ htaccess

2003-10-20 Thread Curt Zirzow
* Thus wrote Andrew Warner ([EMAIL PROTECTED]):
 I've never used php cgi version, and all the httacces configuration 
 I've tried to map .phpc files to the php cgi binary hasn't worked 
 right.  I need an  example htacces file or an example of a script 
 header line with php location.

With cgi you don't map the file to the php cgi binary.  You have to
set up a directory with a 'Script-Alias' directive to point to a
paticular folder for running files as cgi.  Hopefully this is
already done and there is a cgi-bin outside your web tree.

See apache's documentation on doing this.

Once you have the cgi-bin set up you put your php file in the
cgi-bin with the top of the php file with something like: 

#!/path/to/your/home/php
?php
echo hello worldbr\n;
?

Set this file permission bit to be executable and it should all
work.  All of this is done from memory so a bit might be a bit off
but some searching the archives and google'in will help out.

HTH,

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php