note 43824 modified in oci8.setup by sixd
| From: | sixd@php.net | Date: | Fri, 26 Jun 2009 18:26:01 +0000 |
| Subject: | note 43824 modified in oci8.setup by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157567@lists.php.net to get a copy of this message | ||
For those trying to use the Oracle Instant Client 10g in a win32 environment, heres a nice easy
howto. If you fully read the docs properly and understand what your reading you will be able to set
it up, but if like me you want a quick easy fix, heres how I did it.
1. Download and install the Oracle Instant Client to where ever (lets say c:\ora\client )
2. Add your connect info, copy a previously created or provided tnsnames.ora file to the above
directory.
3. Change Path in the Environment Variables area to add this directory to the path. ie.
c:\ora\client;%SystemRoot%;<and so on>
4. Open regedit and add a Key called ORACLE to HKEY_LOCAL_MACHINE\SOFTWARE
5. To the ORACLE key add a string value called TNS_ADMIN and assign it the directory above (ie.
c:\ora\client ) So you end up with KEY_LOCAL_MACHINE\SOFTWARE\ORACLE\TNS_ADMIN = c:\ora\client
6. Set php to use Oci8 extension and bobs your uncle
7. Reboot.
Option 7 was required as the oci8 extension or php wouldn't pick up the path change. Also my
problem was how to use other programs like sqlplus without creating extra Environment Variables etc
the TNS_ADMIN / tnsnames.ora part makes that simpler and allows you to call things the same as you
would before.
PS: This should apply to all the Instant Clients. I haven't tried it with any others but 10g
though.
Hope this helps.
--was--
For those trying to use the Oracle Instant Client 10g in a win32 environment, heres a nice easy
howto. If you fully read the docs properly and understand what your reading you will be able to set
it up, but if like me you want a quick easy fix, heres how I did it.
1. Download and install the Oracle Instant Client to where ever (lets say c:\ora\client )
2. Add your connect info, copy a previously created or provided tnsnames.ora file to the above
directory.
3. Change Path in the Environment Variables area to add this directory to the path. ie.
c:\ora\client;%SystemRoot%;<and so on>
4. Open regedit and add a Key called ORACLE to HKEY_LOCAL_MACHINE\SOFTWARE
5. To the ORACLE key add a string value called TNS_ADMIN and assign it the directory above (ie.
c:\ora\client ) So you end up with KEY_LOCAL_MACHINE\SOFTWARE\ORACLE\TNS_ADMIN = c:\ora\client
6. Set php to use Oci8 extension and bobs your uncle
7. Reboot.
Option 7 was required as the oci8 extension or php wouldn't pick up the path change. Also my
problem was how to use other programs like sqlplus without creating extra Environment Variables etc
the TNS_ADMIN / tnsnames.ora part makes that simpler and allows you to call things the same as you
would before.
PS: This should apply to all the Instant Clients. I haven't tried it with any others but 10g
though.
Hope this helps.
http://php.net/manual/en/oci8.setup.php