Re: [PHP4BETA] PHP4 & Apache

From: Date: Tue, 29 Feb 2000 03:35:53 +0000
Subject: Re: [PHP4BETA] PHP4 & Apache
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11168@lists.php.net to get a copy of this message
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.

« previous php.version4 (#11168) next »