[fpc-pascal] CGI under Linux using FCL-Web

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Apr 4 13:42:39 CEST 2012

On Wed, 4 Apr 2012, Christian Kranich wrote:

> Hello All,
> I just started to use FPC in  a project requiring a Webinterface.
> When porting the Lazarus/Win32 fpc-web examples (worked fine)
> to X86/Linux(Ubuntu) and Arm-Linux, I started to struggle.
> Under Linux, the cgi program terminates w/o any output and w/o any
> errormessages. So Apache complains about premature page end.
> => Is there anything special to consider when using fcl-web under
> Linux?


* Do not use the crt, video or keyboard units.
* Do not attempt I/O to standard input/output/error.

> => The bread and butter cgi example (mini.pas) did run, but I like the
> concept of FCL-Web offering scalability between CGI, FastCGI, Apache Module
> and do not want to reinvent the wheel...
> Currently I started copying the fcl-web sources to project folder and pinpointing
> with writelns to crosscheck what is running and what is not.

Check the error log of apache. 
It will contain the error output of the CGI script.


More information about the fpc-pascal mailing list