Connecting Tech Pros Worldwide Forums | Help | Site Map

OCI8 install

rtconner
Guest
 
Posts: n/a
#1: Jan 28 '06
I just installed Apache 1.3/PHP 5 on my Windows XP compy. It works
fine. Now I want to get the interface to Oracle 9 installed.

My computer has instant client 10 installed, I regularly use sqlplus
and can connect to the Oracle DB with python without problem.

I uncommented the 'extension=php_oci8.dll' line in php.ini. Now I
recieve a "Fatal error: Call to undefined function oci_connect()" when
I try to use php to connect to the oracle database.

What is going on here? I don't understand what I did wrong.


Andy Hassall
Guest
 
Posts: n/a
#2: Jan 28 '06

re: OCI8 install


On 28 Jan 2006 09:15:01 -0800, "rtconner" <rtconner@gmail.com> wrote:
[color=blue]
>I just installed Apache 1.3/PHP 5 on my Windows XP compy. It works
>fine. Now I want to get the interface to Oracle 9 installed.
>
>My computer has instant client 10 installed, I regularly use sqlplus
>and can connect to the Oracle DB with python without problem.
>
>I uncommented the 'extension=php_oci8.dll' line in php.ini. Now I
>recieve a "Fatal error: Call to undefined function oci_connect()" when
>I try to use php to connect to the oracle database.
>
>What is going on here? I don't understand what I did wrong.[/color]

If you did a straightforward installation then the usual thing to watch for is
that the Oracle software won't be accessible by the local service user that
Apache (and hence PHP runs as). Check the permissions on your Oracle directory
- your interactive user will be able to use it, as you're already using
sqlplus, but probably not the user Apache runs as. An alternative is to get
Apache to run under your user account by modifying the service, but make sure
you realise the possible security implications before doing that.

Also make sure that the Oracle home is on the PATH environment variable _as
seen by the Apache process_ - i.e. set as a global environment variable, not
just a user environment variable.

Were there any errors (either message boxes, or in the Windows Event Log) when
you started Apache that indicates that it couldn't load php_oci8.dll? Usually
these then leads to information about a problem with PHP loading the Oracle
client DLL due to the issues above.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
rtconner
Guest
 
Posts: n/a
#3: Jan 28 '06

re: OCI8 install


Andy Hassall wrote:[color=blue]
> On 28 Jan 2006 09:15:01 -0800, "rtconner" <rtconner@gmail.com> wrote:
>[color=green]
> >I just installed Apache 1.3/PHP 5 on my Windows XP compy. It works
> >fine. Now I want to get the interface to Oracle 9 installed.
> >
> >My computer has instant client 10 installed, I regularly use sqlplus
> >and can connect to the Oracle DB with python without problem.
> >
> >I uncommented the 'extension=php_oci8.dll' line in php.ini. Now I
> >recieve a "Fatal error: Call to undefined function oci_connect()" when
> >I try to use php to connect to the oracle database.
> >
> >What is going on here? I don't understand what I did wrong.[/color]
>
> If you did a straightforward installation then the usual thing to watch for is
> that the Oracle software won't be accessible by the local service user that
> Apache (and hence PHP runs as). Check the permissions on your Oracle directory
> - your interactive user will be able to use it, as you're already using
> sqlplus, but probably not the user Apache runs as. An alternative is to get
> Apache to run under your user account by modifying the service, but make sure
> you realise the possible security implications before doing that.
>
> Also make sure that the Oracle home is on the PATH environment variable _as
> seen by the Apache process_ - i.e. set as a global environment variable, not
> just a user environment variable.
>
> Were there any errors (either message boxes, or in the Windows Event Log) when
> you started Apache that indicates that it couldn't load php_oci8.dll? Usually
> these then leads to information about a problem with PHP loading the Oracle
> client DLL due to the issues above.[/color]

well that was a stroke of genius. I checked the log find the
php_oci8.dll file. I apparently needed to set the extension_dir
directive. and, well everything seems to be working at least a little
better now.

i now get and unkown windows apache.exe exception when I run queries.
but that seems unrelated to this problem.

thanks for the help. I'll play with exception and see what I can do to
remedy it.

-rob

rtconner
Guest
 
Posts: n/a
#4: Jan 28 '06

re: OCI8 install


Well, I guess I have not gotten this fixed. Now when I run queries is
get and Apache.exe error: An unhandled win32 exception occurred in
Apache.exe [pid]. I've searched high and low for error logs and the
best I could find is 'The Apache service terminated unexpectedly. It
has done this N time(s).'
Kind of aggrevating, has anyone else seen this error before? Does
anyone have any guesses on how to fix it?

Andy Hassall
Guest
 
Posts: n/a
#5: Jan 28 '06

re: OCI8 install


On 28 Jan 2006 09:35:48 -0800, "rtconner" <rtconner@gmail.com> wrote:
[color=blue]
>i now get and unkown windows apache.exe exception when I run queries.
>but that seems unrelated to this problem.[/color]

Which version of PHP? 5.1.2 comes with a new and improved version of the OCI8
extension, which amongst other things seems considerably more stable under
multithreaded Apache2 on Windows, at least from some initial testing.

Also you mentioned you're running Apache 1.3 on XP - one of the main changes
in Apache 2.0 is better Windows support
(http://httpd.apache.org/docs/2.0/new_features_2_0.html)

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Closed Thread