Re: CGI BIN PHP

From: Date: Thu, 22 Feb 2001 15:47:23 +0000
Subject: Re: CGI BIN PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-41170@lists.php.net to get a copy of this message
Cool, Hrishi. Can you make it work if you use a different url? For example, for SSL connections like: https://www.secure-website.net/~mydomain I'm thinking of using something like this: $spos=strpos($SCRIPT_FILENAME, "/public_html"); // or whatever the name of the public root dir $firstpath = substr($SCRIPT_FILENAME,0,$spos); $fullpath = $firstpath . SCRIPT_NAME; Not sure, but I think it's close. kind regards, bill Hrishi wrote: > hey, > > don't go bald yet :) > > my web host (communitech.net) has the same setup... is that where you're > hosted ? > > i have a script called 'php4.cgi' in my /cgi-bin which contains: > > #!/bin/sh > #echo -e "Content-type: text/plain\n\n"; > #set > SCRIPT_NAME=$REDIRECT_URL;export SCRIPT_NAME; > SCRIPT_FILENAME=$PATH_TRANSLATED;export SCRIPT_FILENAME; > /bin/php4; > #set > the #ed out commands are for debugging you may not need them. > my .htaccess in the documentroot contains : > > Action application/x-php4-script "/cgi-bin/php4.cgi" > AddHandler application/x-php4-script php > > i hope you can use this. > if you have any other problems, reply to the list because i'm sure more > people can use this 'technique'. its still under testing, (i made it 2 days > ago) so if there are any changes i need to make, i'll post it here. > > cheers, > hrishi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#41170) next »