Re: [PHP] CGI BIN PHP
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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI BIN PHP
hehehehe...exact same hostill try that out tonight...as a side note have you been experiencing some problems lately with responsiveness from the server...i dont know if u r on the same one as me (ZEUS) but I was just curious...ive noticed some "issues" as of later.. When You Compensate For A Lack Of Skill By Doubling Your Efforts, There's No End To What You Can't Do. - Original Message - From: "Hrishi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, February 21, 2001 4:01 AM Subject: Re: [PHP] CGI BIN PHP > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI BIN PHP
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] CGI BIN PHP
I'm sorry for asking this question but I've pulled my hair out looking for an answer and I can't seem to find oneHere's my situation...my host has php 3.0.9 installed as an apache module and php4.0.3.pl1 setup as a cgi binobviously i want to use 4 because I need to do a lot of work with sessionsthe question is how...i thought it woudl be much like PERL...they supply me with a path so i figured just start the php script with something like #!/usr/bin/php4 or whatever the path is to php and i try testing it out by using a php 4 only function but i get fatal errors stating its unsupported which is telling me its still trying to use php 3.0.9...where am i going wrong??? Someone please set me straight...I'm obviously missing something simple... Thanks in advance, Chad Guilette When You Compensate For A Lack Of Skill By Doubling Your Efforts, There's No End To What You Can't Do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]