FastCGI so far is a very popular module that improves web server power and add more functionalities. To develop a FastCGI module, you will need to build the development kit.
Follow the below steps to get it done.
$ wget http://www.fastcgi.com/dist/fcgi.tar.gz
$ tar -xvf fcgi.tar.gz
Access the library directory,
$ cd fcgi-2.4.1.*
You can start building the library.
$ ./configure
$ make
$ sudo make install
Fix build error: ‘EOF’ was not declared in this scope
While building on Linux, you might see this error,
fcgio.cpp:70: error: 'EOF' was not declared in this scope
fcgio.cpp:75: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::
The reason is that the FastCGI library use EOF
macro which is defined in stdio.h
but this header is not included anywhere.
Hence, to fix is to add . Open this file include/fcgio.h
, then add right above iostream
library,
#ifndef FCGIO_H
#define FCGIO_H
#include // <--- here
#include
Try to build the kit again, and it should work.