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 lib. I

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

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:

Re: LD_PRELOAD for modules

2010-03-27 Thread Sorin Manolache
On Sat, Mar 27, 2010 at 12:28, Andrej van der Zee andrejvander...@gmail.com 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

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 set

LD_PRELOAD for modules

2010-03-26 Thread Andrej van der Zee
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 lib. I was hoping that I could use something like LD_PRELOAD