Executive summary: Apache silently fails an SSI include, where the include'd HTML is generated by a C++ program which is linked with SQLite and/or pthreads. The SSI include works when the C++ doesn't use SQLite.
Longer version: I have two very similar C++ programs which produce the output required for an SSI virtual include. Both produce a list of about 100 options for an HTML select
. One of the includes works as expected, but the other one is doing nothing.
- Both programs (when run stand-alone) produce exactly the same output on stdout, and nothing on stderr. So, in principle, they should behave identically, as far as Apache is concerned, but they don't.
- The program which works (version
A
) is straightforward stand-alone C++ code, which uses the STL to produce a string, which is written tocout
; no problem. - The program which fails (version
B
) is slightly more complicated. It's a mix of C and C++, and includes an embedded SQLite database, talking to it through the C API. SQLite also uses pthreads. - Version
B
fails both when it is linked to the static, and the dynamic, SQLite code. Both the static and dynamic versions depend on the pthreads shared library. - Apache produces nothing in the error log when it runs version
B
, but it also substitutes nothing into the HTMLselect
. I can easily get Apache to produce an error message (by specifying a wrong executable name in the HTML#include
, for example) so I'm pretty sure that Apache does actually at least attempt to execute the program. - Both
A
andB
are valgrind-clean. - Apache 2.2.16, Ubuntu 10.10, prefork MPM
- I can't get any output at all out of
ScriptLog
, so I may have set it up incorrectly. I've setLogLevel
todebug
, but it still doesn't tell me anything about script execution.
Any ideas? Thanks.