The thing is, I don't want to limit the script to being in just the "/php5/" directory of my server. I want to be able to run it anywhere:
Apache 2.2 Documentation wrote:There are two steps to allowing CGI execution in an arbitrary directory. First, the cgi-script handler must be activated using the AddHandler or SetHandler directive. Second, ExecCGI must be specified in the Options directive.
As you can see, I've done that. And if I use ScriptAlias, it starts looking for the script in the wrong places...
[Merged Posts - bpat1434]
Oh thank god.... I finally got it working... It took me a bit to play around with, but I got it. I didn't understand that the ScriptAlias directive was saying that my Action will be redirected there. Once I figured that out, I was essentially set. Thank you very much!!
Here is my new httpd-php.conf file:
#
# PHP 4 and PHP 5 configuration for Apache 2.2
#
# Just include this file with your httpd.conf file and this will
# make Apache run php4 as module, and php5 as CGI script.
#
# PHP 5 as CGI
<Directory "C:/WebServer/php5/">
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
ScriptAlias /php5/ "C:/WebServer/php5/"
AddHandler application/x-httpd-php5 .php5
Action application/x-httpd-php5 "/php5/php-cgi.exe"
#
# PHP 4
LoadModule php4_module "C:/WebServer/php4/php4apache2_2.dll"
<IfModule php4_module>
AddType application/x-httpd-php .php .php3 .php4
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/WebServer/php4"
</IfModule>
And a couple screen-shots to prove it's possible 😉
Notice the yellow and green highlighted portions.... this is going to be fun to play with now. The best of both worlds!!!