简体   繁体   中英

cx_Oracle 5.1.1 under apache+mod_wsgi

if I use cx_Oracle 5.0.4, I can connect from python console, and works under apache+django+mod_wsgi

but when I update cx_Oracle 5.1.1, I can connect from python console, BUT same code doesn't work under apache+django+mod_wsgi

File "C:\\Python27\\lib\\site-packages\\django\\db\\backends\\oracle\\base.py", line 24, in
raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e)
TemplateSyntaxError: Caught ImproperlyConfigured while rendering: Error loading cx_Oracle module: DLL load failed: The specified module could not be found.

PS: python 2.7
PSS: I have instaled MSVC 2008 Redistributable x86

Need a solution as well.

I have the same setup on WinXP (Apache 2.2.21/ mod_wsgi 3.3/ python 2.7.2/ cx_Oracle 5.xx). I found that cx_Oracle 5.1 also fails with the same error. Only 5.0.4 works.

Here is the list of changes that were made from 5.0.4 to 5.1:

  1. Remove support for UNICODE mode and permit Unicode to be passed through in everywhere a string may be passed in. This means that strings will be passed through to Oracle using the value of the NLS_LANG environment variable in Python 3.x as well. Doing this eliminated a bunch of problems that were discovered by using UNICODE mode and also removed an unnecessary restriction in Python 2.x that Unicode could not be used in connect strings or SQL statements, for example.
  2. Added support for creating an empty object variable via a named type, the first step to adding full object support.
  3. Added support for Python 3.2.
  4. Account for lib64 used on x86_64 systems. Thanks to Alex Wood for supplying the patch.
  5. Clear up potential problems when calling cursor.close() ahead of the cursor being freed by going out of scope.
  6. Avoid compilation difficulties on AIX5 as OCIPing does not appear to be available on that platform under Oracle 10g Release 2. Thanks to Pierre-Yves Fontaniere for the patch.
  7. Free temporary LOBs prior to each fetch in order to avoid leaking them. Thanks to Uwe Hoffmann for the initial patch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM