Apache, Oracle 8.1, php – what can go wrong

This entry was posted by on Thursday, 26 November, 2009 at

Usualy  it’s no big deal, uncomment

extension=php_oci8.dll

in php.ini and you are ready to go.

If you are unlucky you can have an outdated oracle instance you can not upgrade (say oracle 8.1)

This might result in erros like

Entry point OCIStmtPrepare2 could not be located

or

OCI.dll could not be loaded

This means you’re apache has problems accessing the OCI.dll in your oracle/bin directory. Or the versions may be incompartible. Or something may be very wrong with your Oracle installation. Anyhow, there is a very dirty hack:

  • Get the Oracle instant client, extract it
  • Copy the contents of your instant client to apache/bin (this includes OCI.dll and a lot of other files)
  • Restart Apache
  • Profit!

Another possible error

ORA-12705: Cannot access NLS data files or invalid environment specified

Solution: unset the NLS_LANG variable. This may be in the enviroment, but it may also be in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE). A possible good setting might be AMERICAN_AMERICA.WE8MSWIN1252

One Response to “Apache, Oracle 8.1, php – what can go wrong”

  1. Elios Nieto

    excelente funciona gracias…


Leave a Reply