Installing Oracle for PHP: Difference between revisions
Matt Gibson (talk | contribs) |
|||
Line 56: | Line 56: | ||
*[http://moodle.org/mod/forum/discuss.php?d=65488 Who uses Oracle] | *[http://moodle.org/mod/forum/discuss.php?d=65488 Who uses Oracle] | ||
*[https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Solaris_10_with_Oracle_10 Step by step Install Guide for Solaris 10 with Oracle 10] | *[https://docs.moodle.org/en/Step-by-step_Install_Guide_for_Solaris_10_with_Oracle_10 Step by step Install Guide for Solaris 10 with Oracle 10] | ||
*[http://learningischange.com/2009/05/29/install-moodle-on-an-oracle-database-in-25-minutes-or-less/ Install Moodle on an Oracle Database (in 25 minutes or less)] | *[http://learningischange.com/2009/05/29/install-moodle-on-an-oracle-database-in-25-minutes-or-less/ Install Moodle on an Oracle Database (in 25 minutes or less)]. The related Using Moodle forum discussion is [http://moodle.org/mod/forum/discuss.php?d=124629 here]. | ||
*[http://www.mguhlin.org/2009/05/moodle-on-oracle-database.html Moodle on Oracle Database] discussion on Miguel Guhlin's blog | |||
[[Category:Installation]] | [[Category:Installation]] |
Revision as of 09:25, 29 September 2010
- http://www.oracle.com/technology/pub/notes/technote_php_instant.html
- http://moodle.org/mod/forum/discuss.php?d=65488#p308002 (with attached html document)
- http://es.php.net/oci8
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:
- Upgrade to PHP v5.2.5 or later
- Downgrade to PHP v5.2.1 (reported to work)
- Downgrade only the oci8 driver to the one included in PHP 5.2.1 (it worked for us -- iarenaza)
- 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
- http://bugs.php.net/bug.php?id=42496 -- tracking the PHP OCI8 bug
- http://tracker.moodle.org/browse/MDL-11429 -- diagnostics on the Moodle side
Installing Moodle on Windows with Oracle Express Edition
Introduction
This section explains how to install Moodle with Oracle Express Edition on Windows. I'm using it for debugging purpose. It's definitively not a production environment. The goal is to setup easily and quickly a Moodle/Windows/Oracle environment.
Install Oracle
Download Oracle Express Edition on Oracle web site.
You will also need the Instant client from here (free account sign up needed). Copy everything from the unzipped folder into apache/bin.
Install both.
Access to the oracle console (http://127.0.0.1:8080/apex). Login: SYS Password: the_one_you_entered_during_the_installation
Create a new user and give it all rights (including DBA).
Note: Oracle Express Edition 10g is limited at one database called 'XE'.
Set up your oracle extension
This document does not explain how to setup apache/php for Oracle. You can have more information on Oracle Documentation. On my own machine I used my WAMP installation (Wampserver 2.0) which allowed me to activate all oracle extensions in few clicks (php_oci8, php_oracle, php_pdo_oci, php_pdo_oci8).
Install Moodle
On the database setup page:
Driver: Oracle oci8
Host: empty the field
Database: //localhost:1521/XE
User: the user that you created
Password: the password you gave to the user
Related links
- Installing ORACLE drivers with PHP
- Installing MSSQL for PHP
- PHP
- Can i install Moodle with Oracle database
- Who uses Oracle
- Step by step Install Guide for Solaris 10 with Oracle 10
- Install Moodle on an Oracle Database (in 25 minutes or less). The related Using Moodle forum discussion is here.
- Moodle on Oracle Database discussion on Miguel Guhlin's blog