Re: [PHP4BETA] CGI version of PHP not working

[email protected] (Yury Bokhoncovich) Fri, 09 Jun 2000 10:48:23 +0700
Newsgroups php.version4
Organization FIS
Message-ID <[email protected]>
Hi!
Victor wrote:
> 
> Nope, it didn't work, here is the error I get when I run ./test.cgi from
> command line
> 
> $ /data/www/stonecare/cgi-bin/test.cgi
> Missing name for redirect.
> 
> Here is the error generated by Apache
> [Thu Jun  8 12:12:51 2000] [error] (8)Exec format error: exec of
> /www/cgi-bin/test.cgi failed
> [Thu Jun  8 12:12:51 2000] [error] [client xxx.xxx.xxx.xxx] malformed header
> from script. Bad header=Launching... /opt/apache/bin/s: /www/cgi-bin/test.cgi
> 
> Has anyone gotten the php cgi version to work using #! directive???
> 

show your test.cgi
I'm absolutely sure that my script is OK, maybe you make wrong
assumption about paths?

You'd substitute "path" with the proper one as well as right
DocumentRoot.
[skip]
> > ==================== Cut ========================
> > #!/bin/bash
> > PATH_INFO=/path/index.htm
> > #$SCRIPT_NAME
> > PATH_TRANSLATED=/...MyDocumentRoot(insert your own
> > here).../path/index.htm
> > #$SCRIPT_FILENAME
> > export PATH_INFO
> > export PATH_TRANSLATED
> > #unset SERVER_SOFTWARE
> > #unset SERVER_NAME
> > #unset GATEWAY_INTERFACE
> > #unset REQUEST_METHOD
> > /usr/local/bin/php4b
> > ===================== Cut ========================
> >
[skip]
-- 

WBR, Yury Bokhoncovich,
SysAdmin at FIS.