I wrote a simple python script to run inside IIS 8.0 on Win2012 as web-CGI. Python 2.7.5 and Oracle client 12.1 32-bit and cx_Oracle-5.2-12c.win32-py2.7.exe. cgi-python is enabled in IIS with CGI module and the py script mapping.
The script ran fine as standalone outside IIS on the server, which I think could prove all modules properly are installed on the server. But when invoked from the IIS, the script failed to load the oracle dll: DLL load failed: The specified module could not be found. ORACLE_HOME and python home are set into PATH. Read & execute on ORACLE_HOME is granted to server\users and iis_iusrs. app-pool identity and physical path credential is the local admin. Enable 32-bit app is set True.
I tried pyodbc as well but got a similar error: failed to load a library.
I still believe this must be caused by the missing path or permission for the account running IIS. But I couldn't think of anything else to add.
Any help or suggestion would be appreciated.