ODBC Driver Error: [ODBC Driver Manager] Driver’s SQLAllocHandle on SQL_HANDLE_ENV failed

If you try to connect to an Oracle Database using the Test Connection button in the Data Sources (ODBC) Control Panel, and get the error [Microsoft][ODBC Driver Manager] Driver’s SQLAllocHandle on SQL_HANDLE_ENV failed, try the following suggestions:

Assume Oracle Client in c:OraClient folder and web folder as c:inetpubwwwroot

  1. c:inetpubwwwroot must have Read and Execute privlege for IUSR user.
  2. c:OraClient must have Read and Execute privlege for IUSR user.
  3. The environment PATH variable must have C:OraClientbin included.
  4. Don’t forget to restart Web Server

–Many thanks to asnanisatish for summarizing all these solutions.