Re: PHP and CGI

From: Date: Wed, 19 Aug 2009 14:12:00 +0000
Subject: Re: PHP and CGI
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-296968@lists.php.net to get a copy of this message
At 5:10 PM -0700 8/18/09, sono-io@fannullone.us wrote:
I've searched high and low for an answer to this. Hopefully someone here might know. Can PHP be used under a CGI? I tried to put the following code on one of my perl shopping cart pages but it doesn't work: <?php echo "<select name=\"Year\">"; for ($year = date("Y") ; $year <= date("Y") + 8 ; $year++) { echo "<option value=\"$year\">$year</option>\n"; } echo "</select>"; ?> It works fine on a .php page. I know that SSI will not work under CGI, so maybe it's the same for PHP. Is there anyway to get this to work? Thanks, Frank
Frank: I won't guarantee that this will work, but it's worth a try. In your .htacess file add this: # handler for phpsuexec. -- makes following prefixes considered for php <FilesMatch "\.(htm|html|pl)$"> SetHandler application/x-httpd-php </FilesMatch> If it works, let me know. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#296968) next »