"Fossies" - the Fresh Open Source Software Archive

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


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

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


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