Page 1 of 1

PHP connection to Oracle 9

Posted: Mon Sep 08, 2003 1:28 pm
by ericsodt
Does anyone know if you can connect to oracle with ODBC or does Oracle require another way?? I just got my hands on Oracle and since I love using it, I would rather go with Oracle, however I have never connected with PHP, does anyone know??

thnx

Posted: Mon Sep 08, 2003 1:49 pm
by JAM
A good start would be this link to the manuals. We are using Oracle at work, but not (yet) with PHP.

The manual however will give you more than you need about those two working together.

Posted: Mon Sep 08, 2003 3:34 pm
by ericsodt
I am running PHP on a windows platform and did not have to install any extensions cause windows already does it for you. Do I need to do anything with the oracle extensions??

JAM wrote:A good start would be this link to the manuals. We are using Oracle at work, but not (yet) with PHP.

The manual however will give you more than you need about those two working together.

Posted: Mon Sep 08, 2003 3:42 pm
by JAM
Well if you havn't allready, you should edit your php.ini file and uncomment the following two lines (pre-compiled extension modules):

;extension = php_oci8.dll
;extension = php_oracle.dll

after that, just start coding. Yes, you can connect using ODBC with the server DSN setup if wanted, but PHP is far better of if you connect to the server directly.

Posted: Mon Sep 08, 2003 3:58 pm
by ericsodt
Well seeing as the scripts will be on the main computer that Oracle will be on theres no point connecting to the server directly since they'll be on the same system. besides ODBC, what other options do I have with Oracle??

JAM wrote:after that, just start coding. Yes, you can connect using ODBC with the server DSN setup if wanted, but PHP is far better of if you connect to the server directly.

Posted: Tue Sep 09, 2003 4:08 am
by twigletmac
The link to the manual JAM gave you will tell you all about the functions in PHP which allow you to work with an Oracle database.

Mac