Re: [cx-oracle-users] 'ImportError: DLL load failed' only happens with Apache WSGI
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2012-07-03 17:29:02
|
Hi, This *might* be related to the fact that Python strips the manifest information out of the DLL when building. I just ran into that myself and I don't see any particular way around it -- other than what I did which was (a) go into distutils.msvc9compiler and put a return at the beginning of the _remove_visual_c_ref() method or (b) add the manifest back into the DLL after the fact. I am hesitant to add the manifest back in after so much effort was taken to rip it out...but perhaps you can try this method and see if it works for you: Take the attached manifest file and then run the following command: mt -manifest <location_of_manifest_attached_here> -outputresource:<location_of_cx_Oracle.pyd> If you don't have the Windows SDK on your machine then I can e-mail you an updated pyd for you to try if you'd like. Send me a private e-mail. Anthony On Wed, Jun 20, 2012 at 8:49 AM, Michael Freylinger <mic...@gm...> wrote: > 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) > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |