Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Installing Oracle for PHP.

Installing Oracle for PHP

From MoodleDocs
Revision as of 03:03, 14 November 2007 by Martin Langhoff (talk | contribs)

Note: This article is a work in progress. Please use the page comments or an appropriate moodle.org forum for any recommendations/suggestions for improvement.



Important Note: Don't forget to enable this variable in your php.ini (or .htaccess) file:

(else, all your data will be escaped following MySQL rules, that are incorrect for Oracle)

   magic_quotes_sybase = On


Broken versions of OCI8 driver

PHP v5.2.4 (and perhaps v5.2.3 as well) have shipped with a bug in the OCI8 driver that leaks statement handles. The version of the OCI8 driver with the bug is v1.2.4. Possible workarounds:

  • Downgrade to PHP v5.2.1 (reported to work)
  • Downgrade only the oci8 driver to the one included in PHP 5.2.1 (does this work?)
  • If you are on linux and/or can compile PECL extensions, install an older OCI8 driver (v1.2.3 seems to work) from the PECL repository http://pecl.php.net/package/oci8

More information at

Related links

Installing MSSQL for PHP