Re: php cgi configuration w/ htaccess

From: Date: Tue, 21 Oct 2003 05:24:47 +0000
Subject: Re: php cgi configuration w/ htaccess
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-166898@lists.php.net to get a copy of this message
* Thus wrote Andrew Warner (awarner@calendarserve.com): > 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 world<br>\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/

« previous php.general (#166898) next »