Re: LD_PRELOAD for modules

2010-03-27 Thread William A. Rowe Jr.
On 3/26/2010 10:36 PM, Andrej van der Zee wrote: > Hi, > > I want to override a library that is linked with an Apache module, > i.e. I want to use my modified version of the MySQL client library for > example for mod_php. I would like to do this without relinking or even > modifying the mod_php li

Re: LD_PRELOAD for modules

2010-03-27 Thread Andrej van der Zee
Hi William, > > LoadFile > Saving on ink aren't you ;) Thanks for the advise, I will give it a go soon. Just one question you might be able to answer. From the documentation it looks like LoadFile is used to add additional code. In my case, I need to override existing functionality. For example,

Re: LD_PRELOAD for modules

2010-03-27 Thread Saju Pillai
Andrej van der Zee wrote: Hi William, LoadFile Saving on ink aren't you ;) Thanks for the advise, I will give it a go soon. Just one question you might be able to answer. From the documentation it looks like LoadFile is used to add additional code. In my case, I need to override existing fu

Re: LD_PRELOAD for modules

2010-03-27 Thread Andrej van der Zee
Hi, > > When mod_php is loaded into httpd, it's mysql dependencies/symbols will get > resolved against the mysql client you have already LoadFile'd into httpd. > Thanks that is could news, so the libraries in LoadFile directives are loaded first. Thanks, Andrej

Re: LD_PRELOAD for modules

2010-03-27 Thread Andrej van der Zee
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/ba

Re: LD_PRELOAD for modules

2010-03-27 Thread Sorin Manolache
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 Apach

Re: LD_PRELOAD for modules

2010-03-27 Thread Andrej van der Zee
Hi Sorin, > > 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