[cx-oracle-users] 'ImportError: DLL load failed' only happens with Apache WSGI
Brought to you by:
atuining
From: Michael F. <mic...@gm...> - 2012-06-20 14:49:31
|
Hi everybody, I can import cx_Oracle from Python console. I can import cx_Oracle from a CGI script run by Apache (and I can connect to my database and run SQL queries). But I CANNOT import cx_Oracle from a WSGI script run by Apache. Apache logs the error 'ImportError: DLL load failed: The specified module could not be found.' 'import cx_Oracle' is the first statement of my CGI and WSGI script. I printed the os.environ in both CGI and WSGI scripts and the only Oracle related stuff is in variable PATH which contains 'C:\oraclexe\app\oracle\product\11.2.0\server\bin', which is present in both cases. So what could be different in WSGI that makes the import fail? Software: Operating system = 'Windows-XP-5.1.2600-SP3' Python version = '2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]' SERVER_SOFTWARE = Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.3 cx_Oracle module version = '5.1.1' Oracle client version = (11, 2, 0, 2, 0) |