Re: [PDO] PDO_OCI

[email protected] (Goran Miskovic) Thu, 31 Mar 2011 19:46:19 +0200
Newsgroups php.pdo
Message-ID <[email protected]>
--90e6ba2121fd1f720a049fcae032
Content-Type: text/plain; charset=UTF-8

Hi Chris,

Compiled and running. :)

I did not figure out how make "make test " working.  Script is complaining
that PDO module is not loaded:
PHP Warning:  Cannot load module 'PDO_OCI' because required module 'pdo' is
not loaded in Unknown on line 0
Warning: Cannot load module 'PDO_OCI' because required module 'pdo' is not
loaded in Unknown on line 0

PDO is enabled and correctly loading using CLI. However generated and
loaded tmp-php.ini is missing PDO settings. Sounds as if additional ini
files are not scanned. Any hints?

I will open bug and submit patch as you suggested.

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

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

>
> Comments are inline.
>
>
> On 03/30/2011 01:59 PM, Goran Miskovic wrote:
>
>> 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] <mailto:[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.
>>
>
> It has all the hallmarks of a confused environment - incorrect
> environment vars or even perhaps clashing library versions.
>
> Both the 10.2 and 11g libclntsh.so have the OCIEnvCreate symbol so
> there is something fundamental missing.
>
> Does command-line PHP work?
>
>     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.
>>
>
> Fair enough.  I'm sure some patches for PDO_OCI will be appreciated!
>
>
>     The PDO_OCI from PECL is older than in the PHP 5.3 bundles.
>>
>>
>> I noticed that, but I did not have other option. :)
>>
>
> You should be able to copy the PDO_OCI directory from a PHP 5.3 bundle
> and phpize & configure it.
>
>
>     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.
>>
>
> Since 39312 has multiple overlapping patches (some of which are
> already fixed) and there isn't any maintainer for PDO, I don't see it
> worth continuing with that bug as it stands.  Better to close it and
> log new ones.
>
>
>     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,
>>
>
> Ah, a PDO-specific check.  I guess you are using the Ubuntu PHP
> packages and not using the default location?  Wez & Tony (in
> http://svn.php.net/viewvc?view=revision&revision=179756 and
> http://svn.php.net/viewvc?view=revision&revision=179924) didn't
> structure the config.m4 to cope with non standard install locations
> that Linux distro maintainers may have chosen.  Anyway, why not create
> the patch you need based on the latest 5.3 config.m4 and open a new
> bug?  This will record the changes for anyone else to find.
>
> Chris
>
>
>
>> 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] <mailto:
>> [email protected]>
>>    Tel: +1 650 506 8630 <tel:%2B1%20650%20506%208630>
>>
>>    Blog: http://blogs.oracle.com/opal/
>>
>>
>>
>> --
>> schkovich
>> PHP Dojo <http://phpdojo.blogspot.com/>
>>
>
> --
> Email: [email protected]
> Tel:  +1 650 506 8630
> Blog:  http://blogs.oracle.com/opal/
>

--90e6ba2121fd1f720a049fcae032--