httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <>
Subject Re: LD_PRELOAD for modules
Date Sat, 27 Mar 2010 11:40:45 GMT
On Sat, Mar 27, 2010 at 12:28, Andrej van der Zee
<> wrote:
> Hi,
> Maybe a bit off-topic for this mailing list, but I need to do the same
> preload-trick for CGI applications written in C++. I was thinking
> about a wrapper bash-script that usese LD_PRELOAD in addition to a
> rewrite rule in Apache directive. I have some problems with the
> wrapper script:
> #!/bin/bash
> LD_PRELOAD=/path/to/modified/mysql/
> /mbrace/htbin/cpp-appl.cgi
> Obviously this does not work because I need to redirect stdin to
> cpp-appl.cgi and return whatever cpp-appl.cgi through stdout. Don't
> know how to do this. I am sure I am not the first one to do this, but
> can't find any useful examples. I was hoping you could help me out?
> Thank you,
> Andrej

In the Debian package of apache there's /etc/apache2/envvars. I'm not
sure if this file appears in an out-of-the-box compilation of apache2.
Anyway, /usr/sbin/apache2ctl looks for it and loads it before
launching the server.

The server in launched in the environment that is set in envvars.

So you could try writing

export LD_PRELOAD=...

in envvars.

I do not know if this has an effect on how apache2 spawns the CGI
applications but you might give it a try.


A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

View raw message