Skip to Content.
Sympa Menu

freetds - [freetds] apache/mod python freetds.conf problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lee MacDonald" <lee.macdonald AT schneidertrading.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] apache/mod python freetds.conf problem
  • Date: Wed, 23 May 2007 14:53:31 +0100

Hi Guys,



I'm having this problem with apache/mod_python and freetds0.64 when
trying to connect to a mssql server.



Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)

File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line
204, in handler
module = page_cache[req]

File "/usr/lib/python2.4/site-packages/mod_python/cache.py", line 82,
in __getitem__
return self._checkitem(name)[2]

File "/usr/lib/python2.4/site-packages/mod_python/cache.py", line 124,
in _checkitem
value = self.build(key, name, opened, entry)

File "/usr/lib/python2.4/site-packages/mod_python/publisher.py", line
77, in build
return ModuleCache.build(self, key, req, opened, entry)

File "/usr/lib/python2.4/site-packages/mod_python/cache.py", line 371,
in build
exec opened in module.__dict__

File "/opt/www/html/py/test_pymssql.py", line 3, in ?
con =
pymssql.connect(host='lonschcomp01',user='lcrt',password='***',database=
'LcsLog')

File "/usr/lib/python2.4/site-packages/pymssql.py", line 335, in
connect
con = _mssql.connect(dbhost, dbuser, dbpasswd)

error: DB-Lib error message 20009, severity 9:
Server is unavailable or does not exist.



However, when running the same script from the command line it works
fine. I've tried playing with LD_LIBRARY_PATH's, moving the
freetds.conf to different locations, but all with no luck.



Freetds was installed in the default linux locations of /usr/local/lib
and if I move libsybdb.so.5.0.0, I get the following:



ImportError: libsybdb.so.5: cannot open shared object file: No such file
or directory



So I know mod_python is using the right libraries, it seems it just
can't find the freetds.conf file.



Any ideas would be greatly appreciated.



- Lee.



Schneider Trading
4th Floor,
25 Copthall Avenue
London EC2R 7BP

--------------------------------------------------------



Message from: lee.macdonald AT schneidertrading.com
Message to: freetds AT lists.ibiblio.org
Attached files: 0
This e-mail and any files transmitted with it are confidential, may be
legally privileged, and are for the sole use of the intended recipient.
Copyright in this e-mail and any accompanying document created by us is owned
by us. If you are not the intended recipient of this e-mail or any part of it
please telephone our IT Department at the number shown above or by e-mail at
info AT schneidertrading.com.
You should not use or disclose to any other person the contents of this
e-mail or its attachments (if any), nor take copies. This e-mail is not a
representation or warranty and is not intended nor should it be taken to
create any legal relations, contractual or otherwise.
Schneider Trading Associates Ltd (Registration No. 3692131) is incorporated
in England and Wales and the registered office is at 25 Copthall Avenue,
London EC2R 7BP. The company is authorised and regulated by the Financial
Services Authority




Archive powered by MHonArc 2.6.24.

Top of Page