FastCGI installation error (in function 'init _ module':) Solution

Source: Internet
Author: User

The error code is as follows:

Mod_fastcgi.c: In function 'init _ module ':
Mod_fastcgi.c: 271: 'ap _ null_cleanup 'undeclared (first use in this function)
Mod_fastcgi.c: 271: (each undeclared identifier is reported only once
Mod_fastcgi.c: 271: for each function it appears in .)
Mod_fastcgi.c: In function 'process _ headers ':
Mod_fastcgi.c: 726: Warning: Return makes pointer from integer without a cast
Mod_fastcgi.c: 730: Warning: Assignment makes pointer from integer without a cast
Mod_fastcgi.c: 740: Warning: Assignment makes pointer from integer without a cast
Mod_fastcgi.c: 769: Warning: initialization makes pointer from integer without a cast
Mod_fastcgi.c: 839: Warning: Return makes pointer from integer without a cast
Mod_fastcgi.c: 843: Warning: Return makes pointer from integer without a cast
Mod_fastcgi.c: In function 'set _ uid_n_gid ':

 

The solution to finding a post on the Internet is to create a patch file, but it still doesn't work after he posts it in the source code. His code is as follows:

 

@-73,6 + 73,36 @@
# Define ap_reset_timeout ()
# Define ap_unblock_alarms ()

+/* Starting with Apache 2.2 the backward-compatibility defines
+ * 1.3 APIs are not available anymore. define them ourselves here.
+ */
+ # Ifndef ap_copy_table
+
+ # Define ap_copy_table apr_table_copy
+ # Define ap_cpystrn apr_cpystrn
@-73,6 + 73,36 @@
# Define ap_reset_timeout ()
# Define ap_unblock_alarms ()

+/* Starting with Apache 2.2 the backward-compatibility defines
+ * 1.3 APIs are not available anymore. define them ourselves here.
+ */
+ # Ifndef ap_copy_table
+
+ # Define ap_copy_table apr_table_copy
+ # Define ap_cpystrn apr_cpystrn
+ # Define ap_destroy_pool apr_pool_destroy
+ # Define ap_isspace apr_isspace
+ # Define ap_make_array apr_array_make
+ # Define ap_make_table apr_table_make
+ # Define ap_null_cleanup apr_pool_cleanup_null
+ # Define ap_palloc apr_palloc
+ # Define ap_pcalloc apr_pcalloc
+ # Define ap_psprintf apr_psprintf
+ # Define ap_pstrcat apr_pstrcat
+ # Define ap_pstrdup apr_pstrdup
+ # Define ap_pstrndup apr_pstrndup
+ # Define ap_push_array apr_array_push
+ # Define ap_register_cleanup apr_pool_cleanup_register
+ # Define ap_snprintf apr_snprintf
+ # Define ap_table_add apr_table_add
+ # Define ap_table_do apr_table_do

It may be because the code is not fully posted, or my server configuration is faulty, so the error is still... so I found the body again: according to the source code of the body, the problem is solved:
Complete configuration steps are as follows:
1. My apache version is 2.2.4. follow the steps below to install the README file:

 

$ Cd
$ CP makefile. AP2 makefile // create a makefile

Then refer to the following code
$ Vi a // create a patch file. The specific code is as follows ..
$ Patch-fcgi. H <A // write fcgi. h file
File to patch: fcgi. h // operation result
Patching file fcgi. h

----------------------------------- Confirm that the above steps are completely OK, and then proceed with the following operations
$ Make // pay attention to your default directory when modifying it here
$ Make install

// After installing, this prompt will appear, saying that the directory rule cannot be found, but it doesn't matter. Continue

Make [1]: Entering directory '/opt/mod_fastcgi-2.4.2'
/Opt/httpd-2.2.0/srclib/APR/libtool -- silent -- mode = install CP mod_fastcgi.la/opt/Apache/modules/
Make [1]: Leaving directory '/opt/mod_fastcgi-2.4.2'

 

If your apache2 installation isn't in/usr/local/apache2, then
Set the top_dir variable when running make (or edit
Makefile), e.g. (If your Apache directory is not in the/usr/local/apache2 directory, manually change the directory of the makefile ,)

$ Make top_dir =/usr/local/httpd

// Open the httpd. conf file and configure it as follows:

Add an entry to httpd. conf like this:

Loadmodule fastcgi_module modules/mod_fastcgi.so

 

@-73,6 + 73,36 @@
# Define ap_reset_timeout ()
# Define ap_unblock_alarms ()
 
+/* Starting with Apache 2.2 the backward-compatibility defines
+ * 1.3 APIs are not available anymore. define them ourselves here.
+ */
+ # Ifndef ap_copy_table
+
+ # Define ap_copy_table apr_table_copy
+ # Define ap_cpystrn apr_cpystrn
+ # Define ap_destroy_pool apr_pool_destroy
+ # Define ap_isspace apr_isspace
+ # Define ap_make_array apr_array_make
+ # Define ap_make_table apr_table_make
+ # Define ap_null_cleanup apr_pool_cleanup_null
+ # Define ap_palloc apr_palloc
+ # Define ap_pcalloc apr_pcalloc
+ # Define ap_psprintf apr_psprintf
+ # Define ap_pstrcat apr_pstrcat
+ # Define ap_pstrdup apr_pstrdup
+ # Define ap_pstrndup apr_pstrndup
+ # Define ap_push_array apr_array_push
+ # Define ap_register_cleanup apr_pool_cleanup_register
+ # Define ap_snprintf apr_snprintf
+ # Define ap_table_add apr_table_add
+ # Define ap_table_do apr_table_do
+ # Define ap_table_get apr_table_get
+ # Define ap_table_set apr_table_set
+ # Define ap_table_setn apr_table_setn
+ # Define ap_table_unset apr_table_unset
+
+ # Endif/* defined (ap_copy_table )*/
+
# If (defined (have_writev )&&! Have_writev &&! Defined (no_writev) | defined Win32
# Define no_writev
# Endif
Diff-run mod_fastcgi-2.4.2/makefile. AP2 mod_fastcgi-2.4.2-ap22/makefile. AP2
--- Mod_fastcgi-2.4.2/makefile. AP2 2002-07-29 03:36:34. 000000000 + 0200
++ Mod_fastcgi-2.4.2-ap22/makefile. AP2 20:27:50. 000000000 + 0100
@-+ @@

Green is two different places ..

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.