"Fossies" - the Fresh Open Source Software Archive

Member "cgiwrap-4.1/doc/faq" (16 Jun 2008, 6750 Bytes) of package /linux/www/old/cgiwrap-4.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1                     CGIWrap - Frequently Asked Questions
    2      __________________________________________________________________
    3 
    4   General Questions
    5 
    6    How do I subscribe/unsubscribe from the CGIWrap mailing list?
    7           To subscribe, send a note containing "subscribe" to
    8           cgiwrap-users-request@lists.sourceforge.net.
    9 
   10           To unsubscribe, send a note containing "unsubscribe" to
   11           cgiwrap-users-request@lists.sourceforge.net from the account
   12           that is subscribed to the list.
   13 
   14           If you are unable to subscribe or unsubscribe, send a note to me
   15           at nneul@neulinger.org. Please do not send subscribe/unsubscribe
   16           messages to the list.
   17 
   18           More information on the mailing list is available here.
   19 
   20    How do I send a message to the mailing list?
   21           Any mail sent to cgiwrap-users@lists.sourceforge.net will be
   22           sent to the mailing list, however, you have to be subscribed to
   23           the list. I will occasionally hand approve messages to the list
   24           if I see one from a non-subscriber, but you need to subscribe to
   25           the list.
   26 
   27    What is on topic for the mailing list?
   28           anything cgiwrap related
   29           use of cgiwrap with ssi/cgi/various servers/tricks/etc
   30           Discussion of any cgiwrap incompatibilities with other scripts,
   31           etc.
   32           cgi security questions and issues related or not related to
   33           cgiwrap.
   34           Anything else that comes up that is of interest to a large
   35           number of cgiwrap users.
   36 
   37   Administrative Questions
   38 
   39    I am getting the error about the server userid.
   40           CGIwrap needs to be configured with the userid that your web
   41           server is running as. For apache based servers, this is the
   42           userid that is listed on the "User" line in httpd.conf. You
   43           specify this when configuring CGIWrap using the
   44           --with-httpd-user option.
   45 
   46    I am getting the error "Can't ... ". How can I fix this?
   47           CGIwrap needs to be installed set-uid to root. Log in as root,
   48           change to the server's cgi-bin directory, and issue the
   49           commands:
   50 
   51         chown root cgiwrap
   52         chmod 4755 cgiwrap
   53 
   54    How do I use CGIwrap with server side includes
   55           This is not supported by all web servers, but with Apache, use:
   56 
   57         <!--#include virtual="/cgi-bin/cgiwrap/user/script...."-->
   58 
   59           One of the problems is that this often is a security hole unless
   60           you can enable server side exec/virtual include only of
   61           executables that are in ExecCGI capable directories. Some people
   62           have made patches that will allow this to work. Ask on the list
   63           for details.
   64 
   65    I am getting the error "setgroups() failed!". What is wrong?
   66           This occurs when CGIwrap is unable to set auxilliary groups.
   67           Auxilliary groups are groups that a user is a member of in
   68           /etc/group, that are not the user's primary group in
   69           /etc/passwd. Two things you can do here are to make sure CGIwrap
   70           is installed correctly (has to be setuid root to be able to set
   71           auxilliary groups.), or disable setting auxilliary groups.
   72 
   73    ld.so.1: /net/bin/perl: fatal: /usr/lib/libintl.so.1: can't map file:
   74           errno=12
   75           This indicates that you installed cgiwrap with resource limiting
   76           (with rlimit support) but the limits are set too low. There
   77           isn't enough memory for perl to load. Keep in mind that unix
   78           applications usually use alot of virtual memory, even though
   79           their resident size is small.
   80 
   81    How do I get PHP to work with cgiwrap
   82           Here is an informal how-to I wrote after I set up cgiwrap and
   83           php recently. Much thanks goes to Nathan Nuelinger for the
   84           pointing out the decisive step of compiling with
   85           --enable-discard-path.
   86 
   87           Download cgiwrap and set that up. I already had cgiwrap set up
   88           to wrap cgi scripts, but I did upgrade to the latest version.
   89           Get this working first with some simple cgi script tests. (BTW:
   90           Options you may find helpful include --with-cgi-dir and
   91           --with-httpd-user)
   92 
   93           Download the latest version of php and configure it as a cgi
   94           binary, not as a module. Basically, if you run ./configure with
   95           no options, php will be compiled as a cgi binary. (To set it up
   96           as an apache module, which you don't want to do if you want to
   97           wrap your scripts, you have to explicitly say ./configure
   98           --with-apache.)
   99 
  100           Before you compile php, however, and this is crucial, configure
  101           php with the option --enable-discard-path which allows you to
  102           move the php binary out of the web tree and into /usr/local/bin
  103           (which adds security), but more importantly it allows you to use
  104           php with cgiwrap properly.
  105 
  106           To summarize, you need to run ./configure --enable-discard-path
  107           plus any other options you may desire, and place the php binary
  108           in /usr/local/bin.
  109 
  110           Finally, you need the #!/usr/local/bin/php line at the very top
  111           of every php script you write. Then call the php script with
  112           cgiwrap exactly as you would call a cgi script. For example:
  113 
  114           http://yourdomain.com/cgi-bin/cgiwrap//
  115 
  116           Let me know if you have any questions. Brian
  117 
  118   User Questions
  119 
  120    I am getting a 500 Server Error, how can I debug my script?
  121           CGIwrap supports a debugging mode which can help to debug
  122           scripts. To use it, call CGIwrap via the URL
  123           http://.../cgiwrapd/... instead of http://.../cgiwrap/....
  124 
  125    I am getting the error execv() failed
  126           This generally results from either having the wrong path to
  127           perl, or having control-M's after the path to perl. This is
  128           usually a result of uploading the script in binary mode instead
  129           of ascii. You can fix this by re-uploading the script in ascii
  130           mode, or using vi/perl/etc. to get rid of the control-M's in the
  131           file.
  132           For some situations, simply adding " -- " to the end of the
  133           first line of the script will cause the error to go away,
  134           sometimes not.
  135 
  136    How do I use cgiwrapd on a Cobalt RaQ?
  137           cgiwrapd is still there, it just isn't directly obvious how to
  138           use it. If you normally call your script as
  139 
  140           http://www.site1.com/test.cgi
  141 
  142           you can call it as
  143 
  144           http://www.site1.com/cgiwrapDir/cgiwrapd/test.cgi
  145 
  146           to run it under cgiwrapd. Basically they ScriptAlias
  147           "cgiwrapDir" to the directory where cgiwrap is installed.
  148 
  149           Chris Adams