Re: Re: [PHP-DEV] OCI extension help offer
| From: | Thies C. Arntzen | Date: | Thu, 17 Oct 2002 08:11:24 +0000 |
| Subject: | Re: Re: [PHP-DEV] OCI extension help offer | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89614@lists.php.net to get a copy of this message | ||
On Wed, Oct 16, 2002 at 10:22:04AM +0200, predator79@web.de wrote:
> I'm sure glad this in the headlines again ;-)
>
> As Thies knows, I already proposed another important change,
> which is supporting multiple character sets. This is very
> important on shared web platforms, and I have experienced the
> trouble that arises from the way the oci ext treats the session
> environment (-> as a global one). Oracle 9i offers some
> functions which help out from this dilemma, and I have changed
> the existing oci ext to support them. The most important change
> (from a user's viewpoint) is that OCILogon has an optional
> forth parameter, the character set, so an connection looks like
> this:
>
> OCILogon($user,$pass,$tnsname,"WE8ISO8859P1");
>
> Ok, I know this isn't ideal, since OCILogon already has an
> optional parameter, but maybe people can set $tnsname to false
> if they want to use the default one (ORACLE_SID) and use a
> specific character set? Anyway, my code works, and is already
> being used in a relativly big production environment.
>
> >From a developers viewpoint what I mainly did was follow Thies' proposal and put the
> >environment struct in the session struct, and use the global env only for init work. Then I decode
> >the character set parameter (if it is omitted, the NLS_LANG setting or Oracle default will be used)
> >and use it in open_session. Voila, Oracle takes care of the rest.
>
> Works better than I thought :-). The only thing I need to do
> now is to add a compile-time decision on whether Ora9i
> libraries are found or not, and then to make this functionality
> available depending on the version. If anyone's interested I
> can send a patch.. As for the proposed name changes, IMHO it
> doesn't make that much of a sense, 1. since existing apps would
> have to be rewritten, and 2. there is absolutely zero
> effectiveness in merging the ora_ and OCI extensions, which
> differ greatly, into one. I think that would result in a mess
> or a big rewrite..
i'd love to see that patch integrated! can you send it to me?
re,
tc