简体   繁体   English

apache + mod_wsgi下的cx_Oracle 5.1.1

[英]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 如果我使用cx_Oracle 5.0.4,则可以从python控制台连接,并且可以在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 但是当我更新cx_Oracle 5.1.1时,我可以从python控制台连接,但是相同的代码在apache + django + mod_wsgi下不起作用

File "C:\\Python27\\lib\\site-packages\\django\\db\\backends\\oracle\\base.py", line 24, in 文件“ C:\\ Python27 \\ lib \\ site-packages \\ django \\ db \\ backends \\ oracle \\ base.py”,第24行,在
raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e) 引发ImproperlyConfigured(“加载cx_Oracle模块时出错:%s”%e)
TemplateSyntaxError: Caught ImproperlyConfigured while rendering: Error loading cx_Oracle module: DLL load failed: The specified module could not be found. TemplateSyntaxError:渲染时被错误配置:加载cx_Oracle模块时出错:DLL加载失败:找不到指定的模块。

PS: python 2.7 PS:python 2.7
PSS: I have instaled MSVC 2008 Redistributable x86 PSS:我已经安装了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). 我在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. 我发现cx_Oracle 5.1也因相同的错误而失败。 Only 5.0.4 works. 仅5.0.4有效。

Here is the list of changes that were made from 5.0.4 to 5.1: 这是从5.0.4到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. 删除对UNICODE模式的支持,并允许在可能传递字符串的任何地方传递Unicode。这意味着字符串也将使用Python 3.x中的NLS_LANG环境变量的值传递给Oracle。 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. 这样做消除了使用UNICODE模式发现的许多问题,并且还消除了Python 2.x中不必要的限制,例如,无法在连接字符串或SQL语句中使用Unicode。
  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. 添加了对Python 3.2的支持。
  4. Account for lib64 used on x86_64 systems. 在x86_64系统上使用的lib64帐户。 Thanks to Alex Wood for supplying the patch. 感谢Alex Wood提供了补丁。
  5. Clear up potential problems when calling cursor.close() ahead of the cursor being freed by going out of scope. 清除在超出范围释放游标之前调用cursor.close()时可能出现的问题。
  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. 避免在AIX5上进行编译困难,因为在Oracle 10g第2版中该平台上似乎没有OCIPing,这要感谢Pierre-Yves Fontaniere的补丁程序。
  7. Free temporary LOBs prior to each fetch in order to avoid leaking them. 在每次获取之前释放临时的LOB,以避免泄漏它们。 Thanks to Uwe Hoffmann for the initial patch. 感谢Uwe Hoffmann的最初补丁。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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