On Tue, September 17, 2013 18:46, Christopher Jones wrote:
>
>
> On 09/16/2013 11:55 PM, Anatol Belski wrote:
>
>>> I think what I should do is update OCI8 2.0's config.w32. I should
>>> remove the section:
>>>
>>> ARG_WITH("oci8", "OCI8 support", "no");
>>>
>>>
>>>
>>> if (PHP_OCI8 != "no") { ... }
>>>
>>>
>>>
>>> And update the 11g section to refer to 12c:
>>>
>>>
>>>
>>> ARG_WITH("oci8-12c", "OCI8 support using Oracle 12c Instant Client",
>>> "no");
>>>
>>>
>>>
>>> if (PHP_OCI8_12C != "no") { ... }
>>>
>>>
>>>
>>> Does this sound feasible?
>>>
>>>
>> As i can read from config.w32, if --with-oci8-11g was given, it
>> overwrites the config for --with-oci8, so instantclient_11 is used. Also
>> there is some corresponding code in the ext (just grep for 11g). So i'd
>> rather say not updating the 11g section, but adding this 12c snippet
>> after the 11g one. Then it'll overwrite/extend it again for
>> instanceclient_12. The compatibility with the previous versions will
>> also remain.
>>
>>>
>>> I assume that the PHP 5.4 & 5.5 releases would continue to build PHP
>>> OCI8 1.4 with both Oracle 10g & 11g client libraries?
>>>
>>>
>> I'm not the one who decides that, but I think that's right. If the new
>> OCI
>> version is going into PHP next and requires/offers the new Oracle SDK
>> functionality, then it might be the reason for a change.
>>
>> Regards
>>
>>
>> Anatol
>>
>>
>
> I am thinking that PHP OCI8 2.0 should only be built with Oracle 12
> client libraries. You would need to use --with-oci8-12c.
>
>
> I would not touch PHP OCI8 1.4 in the 5.4/5.5 sources, so they would
> continue to be built with Oracle 10 & 11 client libraries in the full PHP
> zip releases.
>
> Alternatively we could build OCI8 2.0 php_oci_11g.dll and php_oci_12c.dll
> Would that be too difficult?
>
>
Hi Christopher,
Currently oci8 is built in both core and PECL with --with-oci8=<path to
instantclient10> --with-oci8-11g=<path to instant client11>. Despite that
both options, only one dll is produced, php_oci8.dll.
What I see here in the header
http://git.php.net/?p=php-src.git;a=blob;f=ext/oci8/php_oci8.h;h=8c5fba9ab087391bc056886677329eed255344d8;hb=refs/heads/master
#define phpext_oci8_ptr &oci8_module_entry
#define phpext_oci8_11g_ptr &oci8_module_entry
So both variants are defined in the same extension, the extension supports
both of them. Also some places in the extension code respect that. What I
thought - you wanted to do it the same way adding --with-oci8-12c=<path to
instantclient12> and the corresponding change in the code. That were just
consequent with the current practice in the oci8 ext. We'd build it with
all the three options set.
I don't know the oci8 ext that good, but as you've mentioned at the start,
it should only be built with instantclient12 - the way I can imagine is
that the 11g option is dropped in config.w32 and only the --with-oci8 is
used. Then it'd need some code cleanups to drop all the 11g cases. And
also in the code you can check for the client version and throw an error
if it's lower than 12.
Or, as you've said, add --with-oci8-12c and we use only this one for the
builds, then it's 12 only. I'm just not sure, what you're trying to
achieve, whether BC is important, etc. Once your decision is there, I can
change the build config to do what it has to.
In all the cases, talking about the PECL version only.
The PHP build system actually creates only one DLL (or SO on linux) for
the given extension, so creating multiple DLL would require to split it
off in multiple extensions. Not that nice but would work of course.
Regards
Anatol
--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php