473,378 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

mercurial is not known from apache2

as i'm not sure if apache2 or python is responsible for this, excuse
if i try to ask here too.

our problem is that mercurial does not work from apache, but from
python command-line it does. what could be a reason for this
behaviour?

-----------------------------------------------
from the command line it works:
-----------------------------------------------
www-data@myserver ~
$ which python
/usr/local/bin/python
www-data@myserver ~
$ echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/lib:/usr/local/lib:/opt/sfw/lib
www-data@myserver ~
$ python
Python 2.5 (r25:51908, Feb 22 2007, 11:38:23)
[GCC 3.4.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>from mercurial.hgweb.hgwebdir_mod import hgwebdir
^D
www-data@myserver ~

-----------------------------------------------
from apache-2.2.4 it does not work:
-----------------------------------------------

environment, output via:
def print_env():
print "Content-Type: text/html\n\n";
for name, value in os.environ.items():
print "%s\t= %s <br/>" % (name, value)
print sys.path

SERVER_SOFTWARE = Apache/2.2.4 (Unix) DAV/2 mod_python/3.2.10 Python/
2.5 SVN/1.4.3 mod_ssl/2.2.4 OpenSSL/0.9.8d
SCRIPT_NAME = /hg
SERVER_SIGNATURE =
REQUEST_METHOD = GET
SERVER_PROTOCOL = HTTP/1.1
QUERY_STRING =
PATH = /usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/ccs/bin:/usr/
sbin:/usr/bin:/usr/dt/bin:/usr/local/bin:/cs/local/bin:/opt/sfw/bin:/
usr/ccs/bin:/opt/VRTS/bin
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
TZ = MET
SERVER_NAME = myserver
REMOTE_ADDR = 169.63.210.220
SERVER_PORT = 80
SERVER_ADDR = 169.62.140.224
DOCUMENT_ROOT = /usr/local/data/htdocs
SCRIPT_FILENAME = /usr/local/data/hg09/hgwebdir.cgi
SERVER_ADMIN = ad***@example.com
HTTP_HOST = myserver
HTTP_CONNECTION = Keep-Alive
REQUEST_URI = /hg
HTTP_ACCEPT = */*
GATEWAY_INTERFACE = CGI/1.1
REMOTE_PORT = 3751
HTTP_ACCEPT_LANGUAGE = en,de-ch;q=0.7,fr;q=0.3
HTTP_ACCEPT_ENCODING = gzip, deflate
UNIQUE_ID = XnNQGqk@i@EAAB9ZBgoAAAAF
['/usr/local/data/hg09', '/usr/local/lib/python2.5/site-packages/
setuptools-0.6c3-py2.5.egg', '/usr/local/lib/python2.5/site-packages/
Genshi-0.4dev_r494-py2.5.egg', '/usr/local/lib/python2.5/site-packages/
TracAccountManager-0.1.3dev_r1844-py2.5.egg', '/usr/local/lib/
python2.5/site-packages/TracCombineWiki-1.2-py2.5.egg', '/usr/local/
lib/python2.5/site-packages/TracForge-1.0-py2.5.egg', '/usr/local/lib/
python2.5/site-packages/TracWebAdmin-0.1.2dev_r4429-py2.5.egg', '/usr/
local/lib/python2.5/site-packages/TracHTTPAuth-1.1-py2.5.egg', '/usr/
local/lib/python2.5/site-packages/IniAdmin-0.1-py2.5.egg', '/usr/local/
lib/python2.5/site-packages/LdapPlugin-0.5.1dev_r1611-py2.5.egg', '/
usr/local/lib/python2.5/site-packages/tracreposearch-0.2-py2.5.egg', '/
usr/local/lib/python2.5/site-packages/TracXMLRPC-0.1-py2.5.egg', '/usr/
local/lib/python2.5/site-packages/TracTicketDelete-1.1.4-py2.5.egg', '/
usr/local/lib/python2.5/site-packages/TracNav-3.92-py2.5.egg', '/usr/
local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local/lib/
python2.5/plat-sunos5', '/usr/local/lib/python2.5/lib-tk', '/usr/local/
lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages']
exception output:
Python 2.5: /usr/local/bin/python
/usr/local/data/hg09/hgwebdir.cgi in ()
29 from mercurial.hgweb.hgwebdir_mod import hgwebdir
30 from mercurial.hgweb.request import wsgiapplication
31 import mercurial.hgweb.wsgicgi as wsgicgi

mercurial undefined, hgwebdir undefined
/usr/local/lib/python2.5/site-packages/mercurial/hgweb/__init__.py in
()
7 # of the GNU General Public License, incorporated herein by
reference.
9 import hgweb_mod, hgwebdir_mod
11 def hgweb(*args, **kwargs):

hgweb_mod undefined, hgwebdir_mod undefined
/usr/local/lib/python2.5/site-packages/mercurial/hgweb/hgweb_mod.py
in ()
7 # of the GNU General Public License, incorporated herein by
reference.
9 import os, mimetypes, re, zlib, mimetools, cStringIO, sys
10 import tempfile, urllib, bz2
11 from mercurial.node import *
os = None, mimetypes = None, re = None, zlib undefined, mimetools
undefined, cStringIO undefined, sys undefined
<type 'exceptions.ImportError'>: ld.so.1: python: fatal: relocation
error: file /usr/local/lib/python2.5/lib-dynload/zlib.so: symbol
inflateCopy: referenced symbol not found

-----------------------------------------------
file system
-----------------------------------------------

# ls -l /usr/local/lib/python2.5/site-packages/mercurial/hgweb/
hgweb_mod.py*
-rw-r----- 1 www-data other 40810 Mär 2 14:13 /usr/local/lib/
python2.5/site-packages/mercurial/hgweb/hgweb_mod.py
-rw-r----- 1 www-data other 45015 Mär 2 14:34 /usr/local/lib/
python2.5/site-packages/mercurial/hgweb/hgweb_mod.pyc

-----------------------------------------------
try to manipulate LD_LIBRARY_PATH
-----------------------------------------------
if we try to set the ld_library_path in the hgwebdir.cgi via:
os.environ["LD_LIBRARY_PATH"] = "/usr/local/lib:/usr/local/lib:/opt/
sfw/lib"
the error mentioned above happens.
if we enter LD_LIBRARY_PATH in the apache2 envvars file, it seems not
to take it (it is not shown in the environment printet above). so
therefor the question if there is anything strange with apache-2.2.4.
just to check i entered a echo statement in apachectl to see if it
finds it and print the path
# apachectl restart
load envvars
/usr/local/lib:/usr/local/lib:/opt/sfw/lib

# nm /usr/local/lib/python2.5/lib-dynload/zlib.so | grep inflate
[209] | 0| 0|FUNC |GLOB |0 |UNDEF |inflate
[181] | 0| 0|FUNC |GLOB |0 |UNDEF |inflateCopy
[192] | 0| 0|FUNC |GLOB |0 |UNDEF |inflateEnd
[174] | 0| 0|FUNC |GLOB |0 |UNDEF |inflateInit2_

-----------------------------------------------
q&na (questions and no answers ..)
-----------------------------------------------
why it does work from the commandline, and not from apache-2.2.4 cgi?
seems to be same ld_library_path, same path, same python, same
mercurial.

--s

Mar 2 '07 #1
0 1036

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Aldo Polli | last post by:
Hi, I have this error when I start apache2 with php4 Syntax error on line 233 of /mypath/apache2/conf/httpd.conf: Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic linker:...
1
by: FL | last post by:
Hi, I'm tring to *test* php5 beta2 as module with Apache 2.0.48 and win2k (I know, I'm nuts :o) First, there is no php5apache2.dll in the beta2 package but a php4apache2.dll (php.net doc...
5
by: Ad Astra | last post by:
I am completely new to PHP and am finding installation the most difficult part to understand and implement. Could someone please review the rather long missive below and assist me? I have...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
1
by: news8080 | last post by:
I downloaded a GUI for nagios that uses PHP but when I point the browser at the PHP file, it shows me the source of .php file instead of executing it, if i use command line 'php filname.php'...
0
by: Larry Hastings | last post by:
I'm working on a patch or two for Python. Now, it's always best to use a source code manager (rcs, whatever) when writing code; in particular it'd make updating to the latest Python trees much...
2
by: mmr315 | last post by:
i write 2 php files for uploading file ,it is giving error like Undefined index: C:\\Apache2.2 in C:\\Apache2.2\\htdocs\\upload_file.php on line 11, upload.php -------------------- <html>...
5
RedSon
by: RedSon | last post by:
Grr! I've been trying to set up apache2 to serve my bugzilla page for like a week now and I give up! I installed bugzilla: /srv$ ls -l drwxr-xr-x www-data www-data bugzilla I've tried...
2
by: sasimca007 | last post by:
If we are using Apache1.3.31 version then in man apache will come and we can use default functions and variables like document_root and send_http_header() etc... But in Apache2 version what is the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.