http://rescomp.stanford.edu/~bshanks/wrap_cgi_php/wrap_cgi_php (try [this] untested one if you only have php3)
disclaimers: i don't know php or cgi. the wrapper adds a second or two to each page access (i think the extra time is a fixed cost, rather than slowness which will get longer the more computation is needed by the cgi). it probably has bugs. it does not support ISINDEX. it has only been tested a few times by myself. it is probably better just to get cgi to work on your server.
a 2 page piece of code hardly deserves to be licenced, but i'm releasing it under the GPL licence anyhow. so no selling stuff, guys :)
1) download the program. store it in the same folder as wiki.pl. rename it so that it has the extension ".php" (or maybe .php3 or .php_something_else?). you can rename the wrap_cgi_php part, too, if you want (i called it "wiki.php").
explanation: the underlying perl script needs to know that it should direct the user to ask for the php wrapper rather than for the cgi. In other words, all user URLs should say wrap_cgi_php.php, not wiki.pl. The user will request wrap_cgi_php.php, and wrap_cgi_php.php then calls wiki.pl.
beats me. if you are having problems with redirects, you might try changing the UseMod config option "RedirType" to 2. you can post a question on this page or you can email me at firstname.lastname@example.org (yahoo, i mean).
The wrapper currently has a bug that occurs if a backslash is ever in any page. When you save edited text containing backslashes, the backslashes are each doubled! This quickly gets out of hand, as you can imagine. Since I only use the script for my homepage and a few other things, I haven't needed to/bothered to fix this yet.
1) change the value of the variable "$cgi_script" at the top of wrap_cgi_php.php to the filename of the cgi that you want to execute.
2) you may need to do something analogous to step (2) for the UseMod case. Here are some ideas:
a) you could edit the source of your cgi program to tell it to direct the user to wrap_cgi_php.php instead of the name of the cgi itself. (or, if it's cool like UseMod, maybe there's a config option)
b) you could rename wrap_cgi_php.cgi to whatever the cgi script thinks its name is (in the UseMod case, that would be wiki.pl). call the cgi script something else (and point to the real cgi script with $cgi_script inside the disguised wrap_cgi_php.php)
c) you could change wrap_cgi_php.cgi so that it scans the outgoing html for instances of the filename of the underlying cgi script, and then replaces those with the filename of wrap_cgi_php.php. There is already a function in wrap_cgi_php.php that gets to look at and change anything in the outgoing http and html right before it gets sent ("ob_handle"). You could put it there.