Dear All,

I've been using for several months an external rewriting program for mod_rewrite in Apache 1.3.27 which is working as expected, now I want to upgrade to Apache 2.2.6 and I run into trouble when my program needs to open a library file not in /usr/lib.

Here are the details of my installation:

- Sun server under Solaris 10

- Apache 2.2.6 compiled with gcc 3.4.6 (gcc installed in /usr/local/bin , /usr/local/lib, etc.). Apache is installed in /www/httpd-2.2.6 with symbolic link /www/apache2

- External rewriting script in Python ( python 2.5.1 installed in /opt/Python-2.5.1 with symbolic link /opt/python, was also compiled with gcc), the script starts with the magical "#!/opt/python/bin/python". The script works stand-alone with the same LD_LIBRARY_PATH as the httpd daemon.

- LD_LIBRARY_PATH of the httpd daemon : /www/httpd-2.2.6/lib:/usr/lib:/usr/local/lib:/usr/dt/lib:/usr/openwin/lib

The problem:

- The external rewriting script crashes with the following message in the error_log:

Traceback (most recent call last):
 File "/www/apache2/conf/extra/query_string.py", line 11, in <module>
   import sys, cgi, urllib
 File "/opt/Python-2.5.1/lib/python2.5/cgi.py", line 37, in <module>
   from operator import attrgetter
ImportError: ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory

- I modified the script to make it dump its environment variables in a file when it starts, it has none.

- I tried to add:
    SetEnv LD_LIBRARY_PATH "/www/httpd-2.2.6/lib:/usr/lib:/usr/local/lib"
 in apache configuration file, it does not change anything.

- If I copy /usr/local/lib/libgcc_s.so.1 in /usr/lib , everything works fine, the script is in the process list as:

wwwextnew: # ps -ef|grep 29311
apache 29313 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start apache 29316 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start apache 29314 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start apache 29317 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start root 29312 29311 0 13:41:02 ? 0:00 /opt/python/bin/python /www/apache2/conf/extra/query_string.py apache 29315 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start root 29311 1 0 13:41:02 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start
wwwextnew: #

But since I don't like to mess up the system installation directories, I'd like to know what I should do to set the LD_LIBRARY_PATH for the python script. (remember, it works with Apache 1.3.27).

Remark:

I have noticed that the process of the python script is directly started by httpd for Apache 2.2.6 :

root 29312 29311 0 13:41:02 ? 0:00 /opt/python/bin/python /www/apache2/conf/extra/query_string.py apache 29315 29311 0 13:41:03 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start root 29311 1 0 13:41:02 ? 0:00 /www/httpd-2.2.6/bin/httpd -k start

but started by a shell for Apache 1.3.27 :

root 6510 6509 0 14:22:17 ? 0:00 /opt/python/bin/python /www/apache/conf/query_string.py root 6509 21261 0 14:22:17 ? 0:00 /bin/sh -c /www/apache/conf/query_string.py apache 14192 21261 0 14:30:46 ? 0:00 /www/apache_1.3.27/bin/httpd -DSSL apache 6527 21261 0 14:22:18 ? 0:03 /www/apache_1.3.27/bin/httpd -DSSL root 21261 1 0 Sep 11 ? 6:36 /www/apache_1.3.27/bin/httpd -DSSL

Thanks in advance for your help and best regards,

Francoise Koenig

Web group - http://www.esrf.eu/


begin:vcard
fn;quoted-printable:Fran=C3=A7oise K=C3=B6nig
n;quoted-printable;quoted-printable:K=C3=B6nig;Fran=C3=A7oise
org:ESRF;Computing Services - Web Group
adr:BP 220;;6 rue Jules Horowitz;GRENOBLE;;38043;France
email;internet:[EMAIL PROTECTED]
tel;work:+33 (0)4 76 88 25 57
x-mozilla-html:TRUE
url:http://www.esrf.eu/
version:2.1
end:vcard


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to