[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php4beta
Subject:    Re: [PHP4BETA] PHP4 & Apache
From:       Yury Bokhoncovich <byg () fis ! nsk ! su>
Date:       2000-02-29 3:35:53
[Download RAW message or body]

Daniel Grapatin wrote:
> 
> Hi..
> 
> Is there any way to use PHP4 Beta with Apache WITHOUT
> recompiling the Apache as Module ?
> I tried a lot but couldn't get it to work.
> 
> thnx.. D. Grapatin
> 
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
Sure! You'd run PHP as CGI.
But there're some hidden traps. I don't know who is really the cause,
but PHP (both 3 and 4)
assumes that PATH_INFO and PATH_TRANSLATED environment variables are
properly set.
Apache since 1.2x (AFAIK) is ignoring this stuff. v1.2x just does not
fill these variables
(they are existing), but 1.3x has not set these vars anymore.:(
I can recommend something like this wrapper:
#!/bin/bash
PATH_INFO=/system/fis/new/index.htm
#$SCRIPT_NAME contains the right value
#PATH_TRANSLATED=/usr/local/apache/virt/vis/index.html
PATH_TRANSLATED=/pub/www/root/system/fis/new/index.htm
#$SCRIPT_FILENAME conatins the right value
export PATH_INFO
export PATH_TRANSLATED
#alternatively, you could just unset vars, mentioned below, to prevent
PHP
#from falling into CGI mode (It stays in CLI mode)
#unset SERVER_SOFTWARE
#unset SERVER_NAME
#unset GATEWAY_INTERFACE
#unset REQUEST_METHOD

/usr/local/bin/php

--

WBR, Yury Bokhoncovich,
SysAdmin at FIS.

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
For additional commands, e-mail: php4beta-help@lists.php.net
To contact the list administrators, e-mail: php4beta-admin@lists.php.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic