ah yes... sorry bout that... the other reply threw me off track ;-)

this is in the go-pear script for detecting sapi. as for why go-pear doesn't
like CGI your guess is as good as mine.

I suspect this is problematic.

In fact I thought the cli version had some minor bugs in it too for win32,
but it worked overall.

/*
 * Try to detect the kind of SAPI used by the
 * the given php.exe.
 * @Author Pierrre-Alain Joye
 */
function win32DetectPHPSAPI()
{
    global $php_bin;
    if($php_bin!=''){
        exec($php_bin.' -v', $res);
        if(is_array($res)) {
            if( isset($res[0]) && strpos($res[0],"(cli)")) {
                return 'cli';
            }
            if( isset($res[0]) && strpos($res[0],"cgi")) {
                return 'cgi';
            } else {
                return 'unknown';
            }
        }
    }
}


"Jswalter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Sek-Mun Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > red herring!
>
> well, wild goose maybe.
>
>
> > those are Apache directives you've listed,
>
> right
>
>
> > not php.ini settings.
>
> right
>
>
> > I assume you mean php.conf which is included by httpd.conf?
>
> Right again.
>
>
>
> >
> > I assume you know how to install php as a SAPI module (you've got all
the
> > directives below plus the help url)
>
> I can only assume you are refering to...
>
>     LoadModule php4_module "/etc/php/sapi/php4apache2.dll"
>
>
> <snip copied docs>
>
> > #  > cli/php -r 'readfile("http://pear.php.net/go-pear";);' > go-pear
>
> Yes, thank you for that walk through.
>
> I'm not looking for the command line version.
>
> I'm asking why the web version gives me CGI error.
>
> If I comment out a few lines in the go-pear, it works fine, I get the web
> version.
>
> I just would like to know why it thinks I'm in CGI mode. In fact, I'd like
> to know how to tell if I'm in CGI mode or SAPI mode.
>
> Thanks
>
> Walter
>
>
>


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

Reply via email to