Re: ImportError: comn_free ?

Marcos Sánchez Provencio <[email protected]>
Newsgroups gmane.comp.python.sybase
Organization www.burke.es
Message-ID <1039432808.1964.6.camel@cynar>
Is the SYBASE env var set when run from CGI?

El vie, 06-12-2002 a las 18:51, Tony Burger escribió:
> This is kinda wierd. This works just fine when run from the command line 
> using "python script_name.py" but blows up when run in a CGI fashion. Any 
> ideas why it can't find "comn_free"?
> ######################################################################
> #!/usr/bin/python
> 
> import Sybase
> 
> def getDatabases():
>     db=Sybase.connect('srv','sa','pwd',database='db',auto_commit=1)
>     c=db.cursor()
>     c.execute('select * from corp_defects_td_databases order by 
> database_report_name asc')
>     varDatabases={}
>     for row in c.fetchall():
>         varDatabases.setdefault(row[0],[]).append(row[1])
>         varDatabases.setdefault(row[0],[]).append(row[2])
>     c.close()
>     db.close()
>     outputHTML="Content-type: text/html\n\n"
>     outputHTML+="""
> <html>
>     <body><center>
>         <h5>test</h5>
>     </center></body>
> </html>"""
>     return outputHTML
> 
> if __name__ == "__main__":
>     print getDatabases()
> ######################################################################
> Error Log:
> 
> [error] Premature end of script headers: corp_defect_admin.py
> [error] Traceback (most recent call last):
> [error] File "/home/tonyb/html/cgi-bin/corp_defect_admin.py", line 3, in ?
> [error] import Sybase
> [error] File 
> "/usr/local/python-threads/lib/python2.2/site-packages/Sybase.py", line 20, 
> in ?
> [error] from sybasect import *
> [error] ImportError: /usr/local/sybase/lib/libcomn.so: undefined symbol: 
> comn_free
> 
> Thanks.
> 
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> Python-sybase mailing list
> [email protected]
> https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
-- 
Marcos Sánchez Provencio <[email protected]>
www.burke.es
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA99HxnTwXdxLmtmxsRAhaaAJ0XKRcQMMpazWMrIit/jCPecPZVDQCfYtdQ
odVo7GeI1d9RRWDSHU7IzLg=
=vE1a
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.