Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

coping 1 file to every cgi-bin in /home with shell script

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
I am installing php-cgi, right now everyone has mod-php

What is and easy way to copy the cgi binary to everyones cgi-bin?

Something like....

foreach $dir in /home
cp php /home/$dir/public_html/cgi-bin
 
Who told you that? The reason everyone is using PHP as an Apache module is because it's faster and better in some, if not most, ways.
Anyway, you shouldn't have to go through all that to make PHP run as a CGI. Simply add [tt].php[/tt] to your [tt]AddHandler cgi-script .cgi .pl .php[/tt] or put the PHP files in your [tt]cgi-bin[/tt] and make the shebang line point to the PHP interpreter in a userwide location should work.

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top