Re: FastCGI with Apache 2.2.0
Gerry Marthe <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
I had a little trouble with this myself. First of all, you should read the INSTALL.AP2 file that comes in the tar file - this explains that you may need to specify the parameter "top_dir" for the Apache2 source when running make. > *NIX > ==== > > $ cd <mod_fastcgi_dir> > $ cp Makefile.AP2 Makefile > $ make > $ make install > > If your Apache2 installation isn't in /usr/local/apache2, then > set the top_dir variable when running make (or edit the > Makefile), e.g. > > $ make top_dir=/opt/httpd/2.0.40 > > Add an entry to httpd.conf like this: > > LoadModule fastcgi_module modules/mod_fastcgi.so Secondly, I found that if running a recent distribution such as Fedora Core 5, the make generated a lot of errors regarding old apache 1.3 function calls. The header file "ap_compat.h" included with Apache 2.2 does not include "apu_compat.h" as it used to. Indeed, I couldn't find any include files resolving the mapping between old apache 1.3 functions and the new version 2.x functions. If that is the case, the Make will fail with errors such as: > mod_fastcgi.c:271: error: 'ap_null_cleanup' undeclared (first use in this function) One solution is to edit the source files, replacing the old function names with the new ones. For instance, the function "ap_null_cleanup" should be apr_pool_cleanup_register (). You can find the function name mappings by consulting the file "apu_compat.h" from an older version of apr-devel (Fedora package), but I've included it here for convenience. Its a bit tedious to do, but it works. Just the same I'd be interested to know how the compatibility issue is supposed to work with the version 2.2 include file of "ap_compat.h" - I'll paste it below: > /** > * @file ap_compat.h > * @brief Redefine Apache 1.3 symbols > */ > > #ifndef AP_COMPAT_H > #define AP_COMPAT_H > > /* redefine 1.3.x symbols to the new symbol names */ > > #define MODULE_VAR_EXPORT AP_MODULE_DECLARE_DATA > #define ap_send_http_header(r) ; > > #endif /* AP_COMPAT_H */ On Mon, 2006-04-03 at 21:51 -0400, Vishal Singh wrote: > Hello, > > Has anyone tried FastCGI with apache 2.2.0. > The install documentation with the distribution of mod_fastcgi-2.4.2 > i.e, http://fastcgi.com/mod_fastcgi/INSTALL assumes presence of > <apache_dir>/src which is not there in Apache 2.0 and 2.2 versions > and it was present in Apache 1.3.34 versions. Also, the > --activate-module is not there in the latest configure file of apache. > > Can anyone share the installation instructions for adding the fast_cgi > module to Apache 2.2.0.? > > Is fast_cgi now inbuilt in Apache? > > Regards, > Vishal > ___________________________________ > fastcgi-developers mailing list > http://fastcgi.com/fastcgi-developers/ -- ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/
apu_compat.h
(text/x-chdr, 6.2 KB)
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [email protected] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ /** * @file apu_compat.h * @brief APR-UTIL Compabitlity Functions * @deprecated These functions are only present for historical purposes */ #ifndef APU_COMPAT_H #define APU_COMPAT_H /** * @defgroup APR_Util_compat 1.3 Compatibility Functions * @ingroup APR_Util * @{ */ /* Include the apr compatibility changes, since apr-util users are * always apr users. */ #include "apr_compat.h" /* -------------------------------------------------------------------- * redefine 1.3.x symbols to those that now live in libapr-util */ /** @deprecated @see apr_base64_decode */ #define ap_base64decode apr_base64_decode /** @deprecated @see apr_base64_decode_binary */ #define ap_base64decode_binary apr_base64_decode_binary /** @deprecated @see apr_base64_decode_len */ #define ap_base64decode_len apr_base64_decode_len /** @deprecated @see apr_base64_encode */ #define ap_base64encode apr_base64_encode /** @deprecated @see apr_base64_encode_binary */ #define ap_base64encode_binary apr_base64_encode_binary /** @deprecated @see apr_base64_encode_len */ #define ap_base64encode_len apr_base64_encode_len /** @deprecated @see apr_hook_deregister_all */ #define ap_hook_deregister_all apr_hook_deregister_all /** @deprecated @see apr_hook_sort_register */ #define ap_hook_sort_register apr_hook_sort_register /** @deprecated @see apr_hook_debug_show */ #define ap_show_hook apr_hook_debug_show /* -------------------------------------------------------------------- * the following symbols were moved from httpd-2.0/.../util_date.[ch] */ /** @deprecated @see apr_date_parse_http */ #define ap_parseHTTPdate apr_date_parse_http /** @deprecated @see apr_date_checkmask */ #define ap_checkmask apr_date_checkmask /* -------------------------------------------------------------------- * the following symbols were moved from httpd-2.0/.../util_xml.[ch] */ /** @deprecated @see apr_text */ #define ap_text apr_text /** @deprecated @see apr_text_header */ #define ap_text_header apr_text_header /** @deprecated @see apr_text_append */ #define ap_text_append apr_text_append /** @deprecated @see APR_XML_NS_DAV_ID */ #define AP_XML_NS_DAV_ID APR_XML_NS_DAV_ID /** @deprecated @see APR_XML_NS_NONE */ #define AP_XML_NS_NONE APR_XML_NS_NONE /** @deprecated @see APR_XML_NS_ERROR_BASE */ #define AP_XML_NS_ERROR_BASE APR_XML_NS_ERROR_BASE /** @deprecated @see APR_XML_NS_IS_ERROR */ #define AP_XML_NS_IS_ERROR(e) APR_XML_NS_IS_ERROR(e) /** @deprecated @see APR_XML_ELEM_IS_EMPTY */ #define AP_XML_ELEM_IS_EMPTY(e) APR_XML_ELEM_IS_EMPTY(e) /** @deprecated @see apr_xml_attr */ #define ap_xml_attr apr_xml_attr /** @deprecated @see apr_xml_elem */ #define ap_xml_elem apr_xml_elem /** @deprecated @see apr_xml_doc */ #define ap_xml_doc apr_xml_doc /** @deprecated @see apr_xml_to_text */ #define ap_xml_to_text apr_xml_to_text /** @deprecated @see APR_XML_X2T_FULL */ #define AP_XML_X2T_FULL APR_XML_X2T_FULL /** @deprecated @see APR_XML_X2T_INNER */ #define AP_XML_X2T_INNER APR_XML_X2T_INNER /** @deprecated @see APR_XML_X2T_LANG_INNER */ #define AP_XML_X2T_LANG_INNER APR_XML_X2T_LANG_INNER /** @deprecated @see APR_XML_X2T_FULL_NS_LANG */ #define AP_XML_X2T_FULL_NS_LANG APR_XML_X2T_FULL_NS_LANG /** @deprecated @see apr_xml_empty_elem */ #define ap_xml_empty_elem apr_xml_empty_elem /** @deprecated @see apr_xml_quote_string */ #define ap_xml_quote_string apr_xml_quote_string /** @deprecated @see apr_xml_quote_elem */ #define ap_xml_quote_elem apr_xml_quote_elem /** @deprecated @see apr_xml_insert_uri */ #define ap_xml_insert_uri apr_xml_insert_uri /** @deprecated @see APR_XML_GET_URI_ITEM */ #define AP_XML_GET_URI_ITEM(a,i) APR_XML_GET_URI_ITEM(a,i) /** @} */ #endif /* APU_COMPAT_H */