httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Purnomo <>
Subject [users@httpd] PHP script named MyProgram.cgi under /cgi-bin ?
Date Sat, 25 Feb 2006 12:19:01 GMT
Hi All,

We have a 3rd party program for our web application, the program lives
under /cgi-bin/*.cgi - we managed to -wrap- one of the cgi script using
PHP, hence the file /cgi-bin/MyProgram.cgi has become a PHP script
rather than a CGI.  


/cgi-bin/program1.cgi   -> binary executeable
/cgi-bin/program2.cgi   -> binary executeable
/cgi-bin/MyProgram.cgi  -> binary executeable


/cgi-bin/program1.cgi   -> binary executeable
/cgi-bin/program2.cgi   -> binary executeable
/cgi-bin/MyProgram.cgi  -> PHP script

It doesn't work with the following configuration:

AddType application/x-httpd-php .php .phtml
AddHandler cgi-script .cgi
ScriptAlias /cgi-bin/ "/my/path/to/cgi-bin/"

At present, I can only get this to work if I change the line:
	AddType application/x-httpd-php .php .phtml 


	AddType application/x-httpd-php .php .phtml .cgi

but of course this setting breaks the other .cgi under /cgi-bin

I have tried the following but it doesnt help:

<Files MyProgram.cgi>
   ForceType application/x-httpd-php
<Location /cgi-bin/MyProgram.cgi>
   ForceType application/x-httpd-php

What I really want is to be able to make all /cgi-bin/* as a CGI or
Script EXCEPT for MyProgram.cgi  ...

Would much appreciate any help

Thanks in advanced


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message