Loading Oracle extension

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jjeffman
Forum Newbie
Posts: 5
Joined: Sat Feb 11, 2006 11:43 am

Loading Oracle extension

Post by jjeffman »

feyd | This topic was split from another much older thread.

I've uncomented the line to load the php_oci8.dll and php_oracle.dll but its functions are not
present when I check them using get_defined_functions. Can someone tell me
what am I doing wrong ?

I did this on two installations : W2003 +Apache1.13+PHP4.3.9 as a module and WXP+Apache2.0.52+PHP4.3.9 as a module, and the result is the same : "Function OCIConnect does not exist" .

Tanks in advance.

Jayme
Last edited by jjeffman on Sat Feb 11, 2006 12:19 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you restart your web server? Are the extension files present? Do you have the client libraries required?

http://php.net/ref.oci8 has a link to get the client libraries.
jjeffman
Forum Newbie
Posts: 5
Joined: Sat Feb 11, 2006 11:43 am

Post by jjeffman »

Yes, I did, and the dll files are present at the PHP extensions directory. I have the Oracle database installed on the same computer as PHP is, 10g on the computer which is runnig XP and 9i on the other. But anyway, the functions should be present, even though the connection fails in case of a lack of configuration, like ORA_SID variables and others. Is that right ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you may have modified the wrong php.ini file. Check phpinfo() to see where your php.ini is being loaded from. It will also show details of the extension if loaded.
jjeffman
Forum Newbie
Posts: 5
Joined: Sat Feb 11, 2006 11:43 am

Post by jjeffman »

Thank you very much.
I will give your suggestion a try. I've already downloaded the Oracle 10g Instant Client, but I don't know where should I put the decompressed files. Can you help me ?
TIA
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The basic instructions for installing are provided on the php manual page I linked already.
jjeffman
Forum Newbie
Posts: 5
Joined: Sat Feb 11, 2006 11:43 am

Post by jjeffman »

Now I have the PHP modules for Oracle being loaded. The PHP oci_connect method is still unavailable. Apache is working fine.
There was not any php.ini file in the Windows directory, phpinfo() show configuration path to "c:\Windows" though. So I copied the php.ini file, which was at the php root folder, to the Windows folder, after setting some environment variables like LD_LIBRARY_PATH and others as suggested on the page you pointed me it is running. Phpinfo() shows :
oci8
OCI8 Support enabled
Revision $Revision: 1.183.2.13 $

The OCILogon function exists but do not perform a connection. May be there is more environment variables to set up.
jjeffman
Forum Newbie
Posts: 5
Joined: Sat Feb 11, 2006 11:43 am

Post by jjeffman »

Thanks to all. Everything is runnig fine.
Connection made!

Jayme
Post Reply