Project

General

Profile

[Solved] How can I get the fastcgi header files

Added by kalmankeri over 1 year ago

I'm trying to write a fastcgi program in C++.
I've successfully configured Lighttpd so my program starts up but I don't know how to continue. I've read the fastcgi wiki page https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI, especially the part "C/C++ FastCGI on lighttpd named socket".

The code sample uses the include dir /usr/include/fastcgi but there's no such directory on my machine. How can I get the include files, or alternatively can I write my program without using them at all? Can you recommend a C++ fastcgi lib that I can use instead?

OS: Ubuntu 22.04
Lighttpd: v1.4.63 (installed via apt install lighttpd)


Replies (2)

RE: [Solved] How can I get the fastcgi header files - Added by gstrauss over 1 year ago

How can I get the fastcgi header files (on Ubuntu)

Your question is more appropriate for an Ubuntu forum.

How can I get the include files

Install the FastCGI development package for your distro, which might be libfcgi-dev.

or alternatively can I write my program without using them at all

First you would need to understand the FastCGI protocol. Given how much you understand about installing packages on Ubuntu, you probably have not looked up the FastCGI protocol specification, either, so I do not recommend this route for you.

Instead, you might use your favorite search engine to look for code that you can cut-n-paste.

In any case, lighttpd test suite implements part of the FastCGI protocol in a simple C program (tests/fcgi-responder.c) for testing lighttpd FastCGI.

RE: [Solved] How can I get the fastcgi header files - Added by kalmankeri over 1 year ago

Thank you. I didn't know that I needed a package in the first place. I'm not too familiar with software development on Linux.

    (1-2/2)