[PHP-DEV] CVS Account Request: abonamous

2002-12-06 Thread Abdul-Kareem Abo-Namous
oracle extension development

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] OCI patch

2002-12-05 Thread Abdul-Kareem Abo-Namous
ahem...yes i'd agree on that...i changed it to something more meaningful and
attached a new patch..ah the switching between c and php programming..;)

the patch is already being used for 2,5 months on an extremly big, extremly
heavy-load 24x7 platform here at hp europe. basically all european hp sites
rely on it. so i guess it's being tested :)

cheers,
Abdul

- Original Message -
From: Thies C. Arntzen [EMAIL PROTECTED]
To: Abdul-Kareem Abo-Namous [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 9:10 AM
Subject: Re: [PHP-DEV] OCI patch


 On Mon, Dec 02, 2002 at 02:27:12PM +0100, Abdul-Kareem Abo-Namous wrote:
  sure, here's thecode, diff'd against the latest cvs (from today). hope
it's
  ok!

 sorry for beeing late.

 the line if (charset != \0) looks bogus to me... you
 probably meant if (*charset) or if (charset[ 0 ] != '\0')?

 besides that it looks OK to me.

 how well tested is that patch? if it really works for you i
 think we are save to commit it to HEAD onece the if thingie
 is fixed.

 re,
 tc

 
  oci8_charsets_oci8c.diff is for oci8.c
  oci8_charsets_configm4.diff for config.m4 and guess what
  oci8_charsets_phpoci8h.diff is for ;-)))
 
  cheers,
  Abdul
 
  - Original Message -
  From: Maxim Maletsky [EMAIL PROTECTED]
  To: Abdul-Kareem Abo-Namous [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Thursday, November 28, 2002 1:27 PM
  Subject: Re: [PHP-DEV] OCI patch
 
 
  
   Thies was on it. But, I think he is pretty busy right now. Resubmit it
   to me and I will look instead of him. Meanwhile, if Thies has time he
   will spare the light on the issue.
  
   --
   Maxim Maletsky
   [EMAIL PROTECTED]
  
  
  
   Abdul-Kareem Abo-Namous [EMAIL PROTECTED] wrote... :
  
hi everyone
   
what happened to the patch i submitted? is it of such bad quality?
;-)
   
maybe someone can tell me more..? :-)
   
thanks,
Abdul
   
- Original Message -
From: [EMAIL PROTECTED]
To: MaximMaletsky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 12:55 PM
Subject: Re: Re: [PHP-DEV] OCI patch
   
   
 Ok, I've attached a pretty ok version. I had to update the
config.m4
  to
inculde a HAVE_OCI9 define, but since I'm not really good in this
kind
  of
thing, buildconf now reports a warning

 autoheader: No template for symbol `HAVE_OCI9'

 don't know what to do about it. otherwise everything compiles and
runs
smoothly, so I hope you'll enjoy :-).

 Abdul

 Maxim Maletsky [EMAIL PROTECTED] schrieb am 17.10.02 12:45:57:
  OK, then.
 
 
  --
  Maxim Maletsky
  [EMAIL PROTECTED]
 
 
 
  [EMAIL PROTECTED] wrote... :
 
  
   Thies, Maxim, if you could hang on for a few hours I'll be
back
  with a
few ideas and a cleaned up version of the patches + a switch for
oracle
  9+
to enable the new nls functions.
  
   Abdul
  
 


   
   
  
 
 --
  --

   
   
 --- oci8.c Wed Oct  9 16:55:16 2002
 +++ oci8.c Thu Oct 17 13:32:09 2002
 @@ -20,7 +20,7 @@

   
+--+
   */

 -/* $Id: oci8.c,v 1.176 2002/09/12 09:48:02 thies Exp $ */
 +/* $Id: oci8.c,v 1.175 2002/08/20 07:26:50 edink Exp $ */

  /* TODO list:
   *
 @@ -199,7 +199,7 @@
  static oci_server *_oci_open_server(char *dbname,int persistent);
  static void _oci_close_server(oci_server *server);

 -static oci_session *_oci_open_session(oci_server* server,char
*username,char *password,int persistent,int exclusive);
 +static oci_session *_oci_open_session(oci_server* server,char
*username,char *password,int persistent,int exclusive,char
*charset);
  static void _oci_close_session(oci_session *session);

  static sb4 oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4,
dvoid
  **,
ub4 *, ub1 *, dvoid **);
 @@ -451,7 +451,7 @@
   OCI_DEFAULT,
   0,
   NULL));
 -
 +
   CALL_OCI(OCIHandleAlloc(
   OCI(pEnv),
   (dvoid **)OCI(pError),
 @@ -631,7 +631,7 @@

   php_info_print_table_start();
   php_info_print_table_row(2, OCI8 Support, enabled);
 - php_info_print_table_row(2, Revision, $Revision: 1.176 $);
 + php_info_print_table_row(2, Revision, $Revision: 1.175 $);
  #ifndef PHP_WIN32
   php_info_print_table_row(2, Oracle Version,
PHP_OCI8_VERSION );
   php_info_print_table_row(2, Compile-time ORACLE_HOME,
  PHP_OCI8_DIR );
 @@ -1158,9 +1158,9 @@
   php_error(E_WARNING, Unknown descriptor type
%d.,Z_TYPE_P(descr));
   return 0;
   }
 -
 +
   CALL_OCI_RETURN(OCI(error), OCIDescriptorAlloc(
 - OCI(pEnv

[PHP-DEV] CVS Account Request: abonamous

2002-12-05 Thread Abdul-Kareem Abo-Namous
ext/OCI8 patches

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] OCI patch

2002-12-02 Thread Abdul-Kareem Abo-Namous
sure, here's thecode, diff'd against the latest cvs (from today). hope it's
ok!

oci8_charsets_oci8c.diff is for oci8.c
oci8_charsets_configm4.diff for config.m4 and guess what
oci8_charsets_phpoci8h.diff is for ;-)))

cheers,
Abdul

- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: Abdul-Kareem Abo-Namous [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 28, 2002 1:27 PM
Subject: Re: [PHP-DEV] OCI patch



 Thies was on it. But, I think he is pretty busy right now. Resubmit it
 to me and I will look instead of him. Meanwhile, if Thies has time he
 will spare the light on the issue.

 --
 Maxim Maletsky
 [EMAIL PROTECTED]



 Abdul-Kareem Abo-Namous [EMAIL PROTECTED] wrote... :

  hi everyone
 
  what happened to the patch i submitted? is it of such bad quality? ;-)
 
  maybe someone can tell me more..? :-)
 
  thanks,
  Abdul
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: MaximMaletsky [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Thursday, October 17, 2002 12:55 PM
  Subject: Re: Re: [PHP-DEV] OCI patch
 
 
   Ok, I've attached a pretty ok version. I had to update the config.m4
to
  inculde a HAVE_OCI9 define, but since I'm not really good in this kind
of
  thing, buildconf now reports a warning
  
   autoheader: No template for symbol `HAVE_OCI9'
  
   don't know what to do about it. otherwise everything compiles and runs
  smoothly, so I hope you'll enjoy :-).
  
   Abdul
  
   Maxim Maletsky [EMAIL PROTECTED] schrieb am 17.10.02 12:45:57:
OK, then.
   
   
--
Maxim Maletsky
[EMAIL PROTECTED]
   
   
   
[EMAIL PROTECTED] wrote... :
   

 Thies, Maxim, if you could hang on for a few hours I'll be back
with a
  few ideas and a cleaned up version of the patches + a switch for oracle
9+
  to enable the new nls functions.

 Abdul

   
  
  
 
 

 --
--
  
 
 
   --- oci8.c Wed Oct  9 16:55:16 2002
   +++ oci8.c Thu Oct 17 13:32:09 2002
   @@ -20,7 +20,7 @@
  
  +--+
 */
  
   -/* $Id: oci8.c,v 1.176 2002/09/12 09:48:02 thies Exp $ */
   +/* $Id: oci8.c,v 1.175 2002/08/20 07:26:50 edink Exp $ */
  
/* TODO list:
 *
   @@ -199,7 +199,7 @@
static oci_server *_oci_open_server(char *dbname,int persistent);
static void _oci_close_server(oci_server *server);
  
   -static oci_session *_oci_open_session(oci_server* server,char
  *username,char *password,int persistent,int exclusive);
   +static oci_session *_oci_open_session(oci_server* server,char
  *username,char *password,int persistent,int exclusive,char *charset);
static void _oci_close_session(oci_session *session);
  
static sb4 oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid
**,
  ub4 *, ub1 *, dvoid **);
   @@ -451,7 +451,7 @@
 OCI_DEFAULT,
 0,
 NULL));
   -
   +
 CALL_OCI(OCIHandleAlloc(
 OCI(pEnv),
 (dvoid **)OCI(pError),
   @@ -631,7 +631,7 @@
  
 php_info_print_table_start();
 php_info_print_table_row(2, OCI8 Support, enabled);
   - php_info_print_table_row(2, Revision, $Revision: 1.176 $);
   + php_info_print_table_row(2, Revision, $Revision: 1.175 $);
#ifndef PHP_WIN32
 php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION );
 php_info_print_table_row(2, Compile-time ORACLE_HOME,
PHP_OCI8_DIR );
   @@ -1158,9 +1158,9 @@
 php_error(E_WARNING, Unknown descriptor type %d.,Z_TYPE_P(descr));
 return 0;
 }
   -
   +
 CALL_OCI_RETURN(OCI(error), OCIDescriptorAlloc(
   - OCI(pEnv),
   + connection-session-pEnv,
 (dvoid*)(descr-ocidescr),
 Z_TYPE_P(descr),
 (size_t) 0,
   @@ -1244,7 +1244,7 @@
 oci_debug(_oci_make_zval: %16s,retlen = %4d,retlen4 =
%d,storage_size4
  = %4d,indicator %4d, retcode = %4d,
  
 
column-name,column-retlen,column-retlen4,column-storage_size4,column-in
  dicator,column-retcode);
  
   - if ((! statement-has_data) || (column-indicator == -1)) { /*
column is
  NULL or statment has no current data */
   + if (column-indicator == -1) { /* column is NULL */
 ZVAL_NULL(value);
 return 0;
 }
   @@ -1351,14 +1351,14 @@
 statement = ecalloc(1,sizeof(oci_statement));
  
CALL_OCI(OCIHandleAlloc(
   - OCI(pEnv),
   + connection-session-pEnv,
 (dvoid **)statement-pStmt,
 OCI_HTYPE_STMT,
 0,
 NULL));
  
CALL_OCI(OCIHandleAlloc(
   - OCI(pEnv),
   + connection-session-pEnv,
 (dvoid **)statement-pError,
 OCI_HTYPE_ERROR,
 0,
   @@ -1392,9 +1392,7 @@
 if (query) {
 statement-last_query = estrdup(query);
 }
   -
 statement-conn = connection;
   - statement-has_data = 0;
  
 statement-id = zend_list_insert(statement,le_stmt);
  
   @@ -1771,7 +1769,6 @@
 }
  
 statement-error = 0; /* OCI_NO_DATA is NO error for us

Re: Re: [PHP-DEV] OCI patch

2002-11-28 Thread Abdul-Kareem Abo-Namous
hi everyone

what happened to the patch i submitted? is it of such bad quality? ;-)

maybe someone can tell me more..? :-)

thanks,
Abdul

- Original Message -
From: [EMAIL PROTECTED]
To: MaximMaletsky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 12:55 PM
Subject: Re: Re: [PHP-DEV] OCI patch


 Ok, I've attached a pretty ok version. I had to update the config.m4 to
inculde a HAVE_OCI9 define, but since I'm not really good in this kind of
thing, buildconf now reports a warning

 autoheader: No template for symbol `HAVE_OCI9'

 don't know what to do about it. otherwise everything compiles and runs
smoothly, so I hope you'll enjoy :-).

 Abdul

 Maxim Maletsky [EMAIL PROTECTED] schrieb am 17.10.02 12:45:57:
  OK, then.
 
 
  --
  Maxim Maletsky
  [EMAIL PROTECTED]
 
 
 
  [EMAIL PROTECTED] wrote... :
 
  
   Thies, Maxim, if you could hang on for a few hours I'll be back with a
few ideas and a cleaned up version of the patches + a switch for oracle 9+
to enable the new nls functions.
  
   Abdul
  
 








 --- oci8.c Wed Oct  9 16:55:16 2002
 +++ oci8.c Thu Oct 17 13:32:09 2002
 @@ -20,7 +20,7 @@

+--+
   */

 -/* $Id: oci8.c,v 1.176 2002/09/12 09:48:02 thies Exp $ */
 +/* $Id: oci8.c,v 1.175 2002/08/20 07:26:50 edink Exp $ */

  /* TODO list:
   *
 @@ -199,7 +199,7 @@
  static oci_server *_oci_open_server(char *dbname,int persistent);
  static void _oci_close_server(oci_server *server);

 -static oci_session *_oci_open_session(oci_server* server,char
*username,char *password,int persistent,int exclusive);
 +static oci_session *_oci_open_session(oci_server* server,char
*username,char *password,int persistent,int exclusive,char *charset);
  static void _oci_close_session(oci_session *session);

  static sb4 oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **,
ub4 *, ub1 *, dvoid **);
 @@ -451,7 +451,7 @@
   OCI_DEFAULT,
   0,
   NULL));
 -
 +
   CALL_OCI(OCIHandleAlloc(
   OCI(pEnv),
   (dvoid **)OCI(pError),
 @@ -631,7 +631,7 @@

   php_info_print_table_start();
   php_info_print_table_row(2, OCI8 Support, enabled);
 - php_info_print_table_row(2, Revision, $Revision: 1.176 $);
 + php_info_print_table_row(2, Revision, $Revision: 1.175 $);
  #ifndef PHP_WIN32
   php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION );
   php_info_print_table_row(2, Compile-time ORACLE_HOME, PHP_OCI8_DIR );
 @@ -1158,9 +1158,9 @@
   php_error(E_WARNING, Unknown descriptor type %d.,Z_TYPE_P(descr));
   return 0;
   }
 -
 +
   CALL_OCI_RETURN(OCI(error), OCIDescriptorAlloc(
 - OCI(pEnv),
 + connection-session-pEnv,
   (dvoid*)(descr-ocidescr),
   Z_TYPE_P(descr),
   (size_t) 0,
 @@ -1244,7 +1244,7 @@
   oci_debug(_oci_make_zval: %16s,retlen = %4d,retlen4 = %d,storage_size4
= %4d,indicator %4d, retcode = %4d,

column-name,column-retlen,column-retlen4,column-storage_size4,column-in
dicator,column-retcode);

 - if ((! statement-has_data) || (column-indicator == -1)) { /* column is
NULL or statment has no current data */
 + if (column-indicator == -1) { /* column is NULL */
   ZVAL_NULL(value);
   return 0;
   }
 @@ -1351,14 +1351,14 @@
   statement = ecalloc(1,sizeof(oci_statement));

  CALL_OCI(OCIHandleAlloc(
 - OCI(pEnv),
 + connection-session-pEnv,
   (dvoid **)statement-pStmt,
   OCI_HTYPE_STMT,
   0,
   NULL));

  CALL_OCI(OCIHandleAlloc(
 - OCI(pEnv),
 + connection-session-pEnv,
   (dvoid **)statement-pError,
   OCI_HTYPE_ERROR,
   0,
 @@ -1392,9 +1392,7 @@
   if (query) {
   statement-last_query = estrdup(query);
   }
 -
   statement-conn = connection;
 - statement-has_data = 0;

   statement-id = zend_list_insert(statement,le_stmt);

 @@ -1771,7 +1769,6 @@
   }

   statement-error = 0; /* OCI_NO_DATA is NO error for us!!! */
 - statement-has_data = 0;

   return 0;
   }
 @@ -1831,16 +1828,12 @@
   _oci_make_zval(column-define-zval,statement,column,OCIFetch,0
TSRMLS_CC);
   }

 - statement-has_data = 1;
 -
   return 1;
   }

   oci_error(statement-pError, func, statement-error);
   oci_handle_error(statement-conn, statement-error);

 - statement-has_data = 0;
 -
   return 0;
  }

 @@ -1855,8 +1848,8 @@
   ub4 siz = 0;
   ub4 readlen = 0;
   char *buf;
 +
   TSRMLS_FETCH();
 -
   *loblen = 0;

   if (Z_TYPE_P(mydescr) == OCI_DTYPE_FILE) {
 @@ -1888,17 +1881,17 @@
   buf = emalloc(readlen + 1);

   while (readlen  0) { /* thies loop should not be entered on readlen ==
0 */
 - CALL_OCI_RETURN(connection-error, OCILobRead(
 +   CALL_OCI_RETURN(connection-error, OCILobRead(
   connection-pServiceContext,
   connection-pError,
   mydescr-ocidescr,
 - readlen, /* IN/OUT bytes toread/read */
 + readlen, /* IN/OUT bytes toread/read */
   siz + 1, /* offset (starts with 1) */
   (dvoid *) ((char *) buf + siz),
   readlen, /* size of buffer */
   (dvoid *)0,
   

[PHP-DEV] php and cyrillics (possibly others)

2002-11-21 Thread Abdul-Kareem Abo-Namous
hi everyone

i already checked the archives on this one, to no avail. apparantly php
doesn't treat cyrillic characters quite correctly, or i don't get it; and
this is an example: let's say i have a cyrillic string which i want to post
to another script which then again inserts it (into oracle). i have tried
all possible encoding settings and nothing worked. all that gets inserted is
'??'.

i'm pretty sure it's not the oci8 extension causing the problem here, since
there are no character set options for ocistmtprepare and ocistmtexecute.
where could i look further?

thx and cheers!
Abdul


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] php cyrillic

2002-11-21 Thread Abdul-Kareem Abo-Namous
hi everyone

i already checked the archives on this one, to no avail. apparantly php
doesn't treat cyrillic characters quite correctly, or i don't get it; and
this is an example: let's say i have a cyrillic string which i want to post
to another script which then again inserts it (into oracle). i have tried
all possible encoding settings and nothing worked. all that gets inserted is
'??'.

i'm pretty sure it's not the oci8 extension causing the problem here, since
there are no character set options for ocistmtprepare and ocistmtexecute.
where could i look further?

thx and cheers!
Abdul


Re: [PHP-DEV] oci8 extension

2002-08-02 Thread Abdul-Kareem Abo-Namous

thanks thies

i was expecting this answer and i'm glad you see it this way, too.

 there is no oci9 AFAIK the interface is called OCI and was
 introduced with oracle8. as were just talking about adding
 some calls (is it that easy?) there is no reason to fork.

i *hope* it's easy. i am just going to add the two needed calls and submit a
patch, pretty straight forward. btw i only called it oci9 to emphasize that
we are using oci functions that are only available in the oci that ships
with oracle 9.

best regards, cu
Abdul


- Original Message -
From: Thies C. Arntzen [EMAIL PROTECTED]
To: Abdul-Kareem Abo-Namous [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, August 02, 2002 11:07 AM
Subject: Re: [PHP-DEV] oci8 extension


 On Thu, Aug 01, 2002 at 12:59:31PM +0200, Abdul-Kareem Abo-Namous wrote:
  hi everyone
 
  i'm new to this list so please be patient with me (but not too patient
;-)).
 
  i am currently a contractor for a pretty big it company that is
migrating
  all its php sites to oracle 9i. since we ran into some large problems
  related to character sets and the way the oci library handles enviroment
  setup in a shared environment, we have agreed to write new functions
that
  expose new functionality in oracle's oci in php. we're talking about a
mere
  2 new functions that can't be used in oracle 8's oci.
 
  now my questions are:
 
  -should i fork the oci8 extension into a new one (oci9 or so) that
includes
  these functions and all other (older) functions with modified names, and
  submit it as a new extension, or

 no.

  -just submit a patch for ext/oci8 that adds these two functions and add
a
  switch that turns them on or off depending on what oci lib version was
found
  during a build process?

 yes.

 
  furtheron, is there anyone out there already working on an oci9
extension?
  anyway, thanks for reading. if there's any interest, i can shed some
light
  on a few details of the problems forcing us to do this.

 there is no oci9 AFAIK the interface is called OCI and was
 introduced with oracle8. as were just talking about adding
 some calls (is it that easy?) there is no reason to fork.

 re,
 tc


 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] oci8 extension

2002-08-01 Thread Abdul-Kareem Abo-Namous

hi everyone

i'm new to this list so please be patient with me (but not too patient ;-)).

i am currently a contractor for a pretty big it company that is migrating
all its php sites to oracle 9i. since we ran into some large problems
related to character sets and the way the oci library handles enviroment
setup in a shared environment, we have agreed to write new functions that
expose new functionality in oracle's oci in php. we're talking about a mere
2 new functions that can't be used in oracle 8's oci.

now my questions are:

-should i fork the oci8 extension into a new one (oci9 or so) that includes
these functions and all other (older) functions with modified names, and
submit it as a new extension, or
-just submit a patch for ext/oci8 that adds these two functions and add a
switch that turns them on or off depending on what oci lib version was found
during a build process?

furtheron, is there anyone out there already working on an oci9 extension?
anyway, thanks for reading. if there's any interest, i can shed some light
on a few details of the problems forcing us to do this.

cu,
Abdul-Kareem Abo-Namous


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php