For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2006 > php_oci8.dll problem -- Oracle 8 + PHP 5 + (win)Apache









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author php_oci8.dll problem -- Oracle 8 + PHP 5 + (win)Apache
Janne Lepola

2006-10-18, 3:57 am

Hi

I'm running PHP 5.0.4 on Windows apache and trying to upgrade PHP to run
on version 5.1.4 or 5.1.6

I installed new version of PHP to new directory (C:\PHP5\), then renamed
old PHP-directory to PHP-backup , and finally renamed PHP5 directory to
PHP. Then I manually changed new php.ini to look just like old php.ini
was (mainly just uncommented OCI8 and GD2 extensions). After restarting
Apache I got error stating:

"The procedure entry point OCILobRead2 could not be located in the
dynamic link library OCI.dll"

I have tried the following:

- Double checked Oracle path enviroments (which are correct and
presented as the first enviroment directories)
- Copied OCI.DLL from Oracle -directory to Apache-directory (and
apache/bin/)
- Tried to install both 5.1.4 and 5.1.6 PHP-versions
- Tried to copy PHP 5.0.4 php_oci8.dll -> 5.1.4 /etx/ directory (as it
seems to be that 5.0.4 version works... but doesn't seem to work when
tried this approach)
- Tried to use multiple different versions of php_oci8.dll. Didn't have
any luck with different versions
- Tried to install Oracle 9i version and set path-settings to point this
new installation of Oracle. The problem persists.

Downgrading back to 5.0.4 (read: renaming 'PHP-backup' -directory to
'PHP') and restarting apache gives flawless results.

I really need some directions here, since even after Googling and
finding few similar messages from forums I haven't been able to find
solution for this problem. Any ideas?

- Janne Lepola, Finland
Andy Hassall

2006-10-18, 6:57 pm

On Wed, 18 Oct 2006 12:46:46 +0300, Janne Lepola <janne.lepola@hl-palvelut.fi>
wrote:

>I'm running PHP 5.0.4 on Windows apache and trying to upgrade PHP to run
> on version 5.1.4 or 5.1.6
>
>I installed new version of PHP to new directory (C:\PHP5\), then renamed
>old PHP-directory to PHP-backup , and finally renamed PHP5 directory to
>PHP. Then I manually changed new php.ini to look just like old php.ini
>was (mainly just uncommented OCI8 and GD2 extensions). After restarting
>Apache I got error stating:
>
>"The procedure entry point OCILobRead2 could not be located in the
>dynamic link library OCI.dll"


PHP's OCI support extension's code has conditional compilation statements so
that it can support new features in newer versions of Oracle, or fall back to
the previous functionality if compiled against an older version of Oracle.

OCILobRead2 is a new OCI function introduced in Oracle 10g, which supports
access to 10g's larger LOB datatype.

The newer Windows binary distributions of PHP's OCI8 extension are compiled
against the Oracle 10g Instant Client SDK, and as a result, cannot be used
against a 9i client, because they try to use this new 10g LOB access function.

Some choices:

* upgrade your Oracle client (installing 10g Instant Client in particular is
quite easy)

* use an older binary version of the OCI8 extension that happens to have been
compiled against 9i or is old enough that it only uses functions that exist in
both 10g and 9i. Not recommended, since newer versions have fewer bugs,
particularly the last couple of versions which had a significant overhaul with
some help from Oracle themselves. And you'll also have to find one that's been
compiled against the newer PHP extension API.

* compile PHP and the extensions from source using Microsoft Visual Studio,
against your 9i client. This is non-trivial - PHP builds easily on UNIX, it's a
royal pain on Windows.

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

2006-10-18, 6:57 pm

On Wed, 18 Oct 2006 19:21:20 +0100, Andy Hassall <andy@andyh.co.uk> wrote:

>On Wed, 18 Oct 2006 12:46:46 +0300, Janne Lepola <janne.lepola@hl-palvelut.fi>
>wrote:
>
>
> Some choices:


And another choice:

* Use Zend Core for Oracle:

http://www.zend.com/products/zend_c...core_for_oracle

This has been updated for PHP 5.1.6, and apparently comes bundled with Instant
Client.

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







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com