Re: [cgiwrap-users] Cgiwrap PHP
Brought to you by:
nneul
From: Brian A. <ba...@no...> - 2001-10-31 15:20:49
|
Here is an informal how-to I wrote after I set up cgiwrap and php recently. Much thanks goes to Nathan Nuelinger for the pointing out the decisive step of compiling with --enable-discard-path. Download cgiwrap and set that up. I already had cgiwrap set up to wrap cgi scripts, but I did upgrade to the latest version. Get this working first with some simple cgi script tests. (BTW: Options you may find helpful include --with-cgi-dir and --with-httpd-user) Download the latest version of php and configure it as a cgi binary, not as a module. Basically, if you run ./configure with no options, php will be compiled as a cgi binary. (To set it up as an apache module, which you don't want to do if you want to wrap your scripts, you have to explicitly say ./configure --with-apache.) Before you compile php, however, and this is crucial, configure php with the option --enable-discard-path which allows you to move the php binary out of the web tree and into /usr/local/bin (which adds security), but more importantly it allows you to use php with cgiwrap properly. To summarize, you need to run ./configure --enable-discard-path plus any other options you may desire, and place the php binary in /usr/local/bin. Finally, you need the #!/usr/local/bin/php line at the very top of every php script you write. Then call the php script with cgiwrap exactly as you would call a cgi script. For example: http://yourdomain.com/cgi-bin/cgiwrap/<username>/<phpscript> Let me know if you have any questions. Brian On Wed, 31 Oct 2001, Roberth Edberg wrote: > Hi, > > Is there any document who describes how to get cgiwrap working with php > scripst on an apache server? > > \Rob > > _______________________________________________ > cgiwrap-users mailing list > cgi...@li... > https://lists.sourceforge.net/lists/listinfo/cgiwrap-users > _______________________________________________________________________________ Brian Allen University of Maryland University College Unix/Internet Systems Programmer _______________________________________________________________________________ |