Re: [PDO] PDO_OCI

[email protected] (Goran Miskovic) Wed, 30 Mar 2011 22:59:05 +0200
Newsgroups php.pdo
Message-ID <[email protected]>
--0016e64608aaaa884c049fb973db
Content-Type: text/plain; charset=UTF-8

Hi Chris,

Thank you for the prompt reply.

Please find my comments bellow.

On Wed, Mar 30, 2011 at 8:46 PM, Christopher Jones <
[email protected]> wrote:

>
> Hi Goran,
>
> How do you set LD_LIBRARY_PATH in the Apache environment? If you're
> using the system Apache, try setting it in /etc/apache2/envvars.  Or
> do you use ld.so.conf?  See "Setting Oracle Environment Variables for
> Apache" on p 106 of
>
> http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html


I used ld.so.conf. Underground PHP Oracle Manual is great. I used it a lot.
Unfortunately my specific case is not covered: I am running Ubuntu x64,
therefore I had to install 32bit Oracle XE, using Debian packag, while
client has to be 64bit and I used Instant Client 11.2 zip distribution.


> I strongly suggest using OCI8 instead of the still "experimental"
> PDO_OCI.  OCI8 has a bunch more basic + advanced features and is
> stable.
>

I installed OCI8 while reviewing Jeffrey Rubinoff tutorial *Creating a
Database Driven Application With PHP
*[1<http://netbeans.org/kb/docs/php/wish-list-oracle-lesson1.html>],
as part of the NetBeans NetCAT 7.0 program. However, I prefer using PDO and
having Oracle database already running on my machine, I saw opportunity to
experiment with PDO_OCI driver.


> The PDO_OCI from PECL is older than in the PHP 5.3 bundles.
>

I noticed that, but I did not have other option. :)


> Since you're on a non-RPM system, you're using the Instant Client
> zips?  You shouldn't need to patch PHP 5.3 config.m4 for the zip
> files.


I did patch config.m4 with few more changes and attached cumulative patch to
my initial email. Have I used wrong patch?!! Complier did not report any
errors.

FWIW yesterday Felipe merged a patch to PDO_OCI config.m4 for
> 64bit RPM support.  http://bugs.php.net/44989


I quickly scanned config.m4 from todays build: It will fail no Ubuntu (and
other Debian distributions I guess). php_pdo_driver.h is not in /include/*
php*/ext/pdo but in /include/*php5*/ext/pdo. See patch that I applied. I
will correct paths (or just create sym link) and try again. :)

Best,

Goran



> Chris


[1] http://netbeans.org/kb/docs/php/wish-list-oracle-lesson1.html

On 03/30/2011 05:15 AM, Goran Miskovic wrote:
>
>> Hi all,
>> After applying patch given in #39312 <
>> http://bugs.php.net/bug.php?id=39312>, and correcting PHP paths
>> (cumulative patch attached) I complied PDO_OCI on Ubuntu 10.10 x64 without
>> any errors.
>>
>> However, Apache is failing to start with following error: symbol lookup
>> error: /usr/lib/php5/20090626/pdo_oci.so: undefined symbol: OCIEnvCreate
>> Help will be highly appreciated.
>> Thanks,
>>
>> --
>> schkovich
>> PHP Dojo <http://phpdojo.blogspot.com/>
>>
>>
>> #39312 http://bugs.php.net/bug.php?id=39312
>>
>>
> --
> Email: [email protected]
> Tel:  +1 650 506 8630
> Blog:  http://blogs.oracle.com/opal/
>


-- 
schkovich
PHP Dojo <http://phpdojo.blogspot.com/>

--0016e64608aaaa884c049fb973db--