# Update for Birdstep RDM Server / RAIMA Velocis support in PHP 4 & 5

- Thread: https://externals.io/message/15947
- Original archive: https://news-web.php.net/php.internals/15947
- Started by John Higgins on 2005-04-11T19:44:35+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15947 — John Higgins — 2005-04-11T19:44:35+00:00

URL: https://externals.io/message/15947#15947

I would like to submit an update for the UODBC module in PHP 4 & 5.  The 
changes update PHP's UODBC module to work with the latest versions of 
Birdstep's RDM Server DBMS, while maintaining compatibility with previously 
supported versions.  The update was necessary due to a change in Birdstep's 
library names as well as new functionality in RDM Server.  The changes 
affect two files, and are detailed in the diff output below.  As I would 
like to update the latest versions of PHP 4 as well as PHP 5, I have pasted 
the diff output for version 5 into this post, and will reply to this post 
with the diff for PHP 4.  Please let me know if I can do anything to make 
this easier...

- John

PHP 5 diff
**********************************************************
Index: ext/odbc/config.m4
===================================================================
RCS file: /repository/php-src/ext/odbc/config.m4,v
retrieving revision 1.72
diff -u -r1.72 config.m4
--- ext/odbc/config.m4  10 Apr 2005 19:23:59 -0000      1.72
+++ ext/odbc/config.m4  11 Apr 2005 17:47:11 -0000
@@ -339,6 +339,22 @@
 [
   PHP_WITH_SHARED

+  ac_birdstep_uname_s=`uname -s 2>/dev/null`
+  ac_birdstep_uname_p=`uname -p 2>/dev/null`
+  case $ac_birdstep_uname_s in
+    AIX) AC_DEFINE(AIX,1,[ ]);;
+    HP-UX) AC_DEFINE(HPUX,1,[ ]);;
+    Linux) AC_DEFINE(LINUX,1,[ ]);;
+    QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
+    SunOS)
+      if test "$ac_birdstep_uname_p" == "i386"; then
+        AC_DEFINE(ISOLARIS,1,[ ])
+      elif test "$ac_birdstep_uname_p" == "sparc"; then
+        AC_DEFINE(SOLARIS,1,[ ])
+      fi;;
+    UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
+  esac
+
   if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
         ODBC_INCDIR=/usr/local/birdstep/include
@@ -350,7 +366,12 @@
     ODBC_INCLUDE=-I$ODBC_INCDIR
     ODBC_TYPE=birdstep
     ODBC_LFLAGS=-L$ODBC_LIBDIR
- 
   ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
+    if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e 
"$ODBC_LIBDIR/libCrdbc32.sl"; then
+ 
     ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 
 -lCrpc32 -lutil"
+    elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e 
"$ODBC_LIBDIR/libCrdbc.sl"; then
+ 
     ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
+    fi
+
     AC_DEFINE(HAVE_BIRDSTEP,1,[ ])

     AC_MSG_RESULT(yes)
Index: ext/odbc/php_odbc.h
===================================================================
RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
retrieving revision 1.58
diff -u -r1.58 php_odbc.h
--- ext/odbc/php_odbc.h 8 Jan 2004 17:32:34 -0000       1.58
+++ ext/odbc/php_odbc.h 11 Apr 2005 17:47:11 -0000
@@ -33,8 +33,8 @@
 extern zend_module_entry odbc_module_entry;
 #define odbc_module_ptr &odbc_module_entry

-#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || 
defined(HAVE_UNIXODBC)
-# define PHP_ODBC_HAVE_FETCH_HASH 1
+#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || 
defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
+#define PHP_ODBC_HAVE_FETCH_HASH 1
 #endif

 /* user functions */

---

## #15948 — John Higgins — 2005-04-11T19:46:26+00:00

URL: https://externals.io/message/15947#15948 · In reply to: #15947

... and here is the diff output for PHP 4...

Index: ext/odbc/config.m4
===================================================================
RCS file: /repository/php-src/ext/odbc/config.m4,v
retrieving revision 1.55.2.10
diff -u -r1.55.2.10 config.m4
--- ext/odbc/config.m4  18 Jan 2005 21:21:16 -0000      1.55.2.10
+++ ext/odbc/config.m4  11 Apr 2005 17:50:46 -0000
@@ -305,6 +305,22 @@
 [
   PHP_WITH_SHARED

+  ac_birdstep_uname_s=`uname -s 2>/dev/null`
+  ac_birdstep_uname_p=`uname -p 2>/dev/null`
+  case $ac_birdstep_uname_s in
+    AIX) AC_DEFINE(AIX,1,[ ]);;
+    HP-UX) AC_DEFINE(HPUX,1,[ ]);;
+    Linux) AC_DEFINE(LINUX,1,[ ]);;
+    QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
+    SunOS)
+      if test "$ac_birdstep_uname_p" == "i386"; then
+        AC_DEFINE(ISOLARIS,1,[ ])
+      elif test "$ac_birdstep_uname_p" == "sparc"; then
+        AC_DEFINE(SOLARIS,1,[ ])
+      fi;;
+    UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
+  esac
+
   if test "$withval" != "no"; then
     if test "$withval" = "yes"; then
         ODBC_INCDIR=/usr/local/birdstep/include
@@ -316,7 +332,13 @@
     ODBC_INCLUDE=-I$ODBC_INCDIR
     ODBC_TYPE=birdstep
     ODBC_LFLAGS=-L$ODBC_LIBDIR
- 
   ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
+
+    if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e 
"$ODBC_LIBDIR/libCrdbc32.sl"; then
+ 
     ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 
 -lCrpc32 -lutil"
+    elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e 
"$ODBC_LIBDIR/libCrdbc.sl"; then
+ 
     ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
+    fi
+
     AC_DEFINE(HAVE_BIRDSTEP,1,[ ])

     AC_MSG_RESULT(yes)
Index: ext/odbc/php_odbc.h
===================================================================
RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
retrieving revision 1.48.4.5
diff -u -r1.48.4.5 php_odbc.h
--- ext/odbc/php_odbc.h 14 Jul 2003 16:13:30 -0000      1.48.4.5
+++ ext/odbc/php_odbc.h 11 Apr 2005 17:50:46 -0000
@@ -33,8 +33,8 @@
 extern zend_module_entry odbc_module_entry;
 #define odbc_module_ptr &odbc_module_entry

-#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || 
defined(HAVE_UNIXODBC)
-# define PHP_ODBC_HAVE_FETCH_HASH 1
+#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || 
defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
+#define PHP_ODBC_HAVE_FETCH_HASH 1
 #endif

 /* user functions */










"John Higgins" <jhiggins@birdstep.com> wrote in message 
news:20050411194129.765.qmail@lists.php.net...
>I would like to submit an update for the UODBC module in PHP 4 & 5.  The 
>changes update PHP's UODBC module to work with the latest versions of 
>Birdstep's RDM Server DBMS, while maintaining compatibility with previously 
>supported versions.  The update was necessary due to a change in Birdstep's 
>library names as well as new functionality in RDM Server.  The changes 
>affect two files, and are detailed in the diff output below.  As I would 
>like to update the latest versions of PHP 4 as well as PHP 5, I have pasted 
>the diff output for version 5 into this post, and will reply to this post 
>with the diff for PHP 4.  Please let me know if I can do anything to make 
>this easier...
>
> - John
>
> PHP 5 diff
> **********************************************************
> Index: ext/odbc/config.m4
> ===================================================================
> RCS file: /repository/php-src/ext/odbc/config.m4,v
> retrieving revision 1.72
> diff -u -r1.72 config.m4
> --- ext/odbc/config.m4  10 Apr 2005 19:23:59 -0000      1.72
> +++ ext/odbc/config.m4  11 Apr 2005 17:47:11 -0000
> @@ -339,6 +339,22 @@
> [
>   PHP_WITH_SHARED
>
> +  ac_birdstep_uname_s=`uname -s 2>/dev/null`
> +  ac_birdstep_uname_p=`uname -p 2>/dev/null`
> +  case $ac_birdstep_uname_s in
> +    AIX) AC_DEFINE(AIX,1,[ ]);;
> +    HP-UX) AC_DEFINE(HPUX,1,[ ]);;
> +    Linux) AC_DEFINE(LINUX,1,[ ]);;
> +    QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
> +    SunOS)
> +      if test "$ac_birdstep_uname_p" == "i386"; then
> +        AC_DEFINE(ISOLARIS,1,[ ])
> +      elif test "$ac_birdstep_uname_p" == "sparc"; then
> +        AC_DEFINE(SOLARIS,1,[ ])
> +      fi;;
> +    UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
> +  esac
> +
>   if test "$withval" != "no"; then
>     if test "$withval" = "yes"; then
>         ODBC_INCDIR=/usr/local/birdstep/include
> @@ -350,7 +366,12 @@
>     ODBC_INCLUDE=-I$ODBC_INCDIR
>     ODBC_TYPE=birdstep
>     ODBC_LFLAGS=-L$ODBC_LIBDIR
> - 
> ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
> +    if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e 
> "$ODBC_LIBDIR/libCrdbc32.sl"; then
> + 
> ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32 
>  -lCrpc32 -lutil"
> +    elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e 
> "$ODBC_LIBDIR/libCrdbc.sl"; then
> + 
> ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
> +    fi
> +
>     AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
>
>     AC_MSG_RESULT(yes)
> Index: ext/odbc/php_odbc.h
> ===================================================================
> RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
> retrieving revision 1.58
> diff -u -r1.58 php_odbc.h
> --- ext/odbc/php_odbc.h 8 Jan 2004 17:32:34 -0000       1.58
> +++ ext/odbc/php_odbc.h 11 Apr 2005 17:47:11 -0000
> @@ -33,8 +33,8 @@
> extern zend_module_entry odbc_module_entry;
> #define odbc_module_ptr &odbc_module_entry
>
> -#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) 
> || defined(HAVE_UNIXODBC)
> -# define PHP_ODBC_HAVE_FETCH_HASH 1
> +#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) 
> || defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
> +#define PHP_ODBC_HAVE_FETCH_HASH 1
> #endif
>
> /* user functions */

---

## #15965 — Jani Taskinen — 2005-04-14T21:19:40+00:00

URL: https://externals.io/message/15947#15965 · In reply to: #15947

I have committed a little bit modified version of this
     patch in all branches. Basically I just replaced your two
     'uname' calls by using $host_alias and used $SHLIB_SUFFIX_NAME
     instead of .so / .sl.

     --Jani




> I would like to submit an update for the UODBC module in PHP 4 & 5.  The
> changes update PHP's UODBC module to work with the latest versions of
> Birdstep's RDM Server DBMS, while maintaining compatibility with previously
> supported versions.  The update was necessary due to a change in Birdstep's
> library names as well as new functionality in RDM Server.  The changes
> affect two files, and are detailed in the diff output below.  As I would
> like to update the latest versions of PHP 4 as well as PHP 5, I have pasted
> the diff output for version 5 into this post, and will reply to this post
> with the diff for PHP 4.  Please let me know if I can do anything to make
> this easier...
>
> - John
>
> PHP 5 diff
> **********************************************************
> Index: ext/odbc/config.m4
> ===================================================================
> RCS file: /repository/php-src/ext/odbc/config.m4,v
> retrieving revision 1.72
> diff -u -r1.72 config.m4
> --- ext/odbc/config.m4  10 Apr 2005 19:23:59 -0000      1.72
> +++ ext/odbc/config.m4  11 Apr 2005 17:47:11 -0000
> @@ -339,6 +339,22 @@
> [
>   PHP_WITH_SHARED
>
> +  ac_birdstep_uname_s=`uname -s 2>/dev/null`
> +  ac_birdstep_uname_p=`uname -p 2>/dev/null`
> +  case $ac_birdstep_uname_s in
> +    AIX) AC_DEFINE(AIX,1,[ ]);;
> +    HP-UX) AC_DEFINE(HPUX,1,[ ]);;
> +    Linux) AC_DEFINE(LINUX,1,[ ]);;
> +    QNX) AC_DEFINE(NEUTRINO,1,[ ]);;
> +    SunOS)
> +      if test "$ac_birdstep_uname_p" == "i386"; then
> +        AC_DEFINE(ISOLARIS,1,[ ])
> +      elif test "$ac_birdstep_uname_p" == "sparc"; then
> +        AC_DEFINE(SOLARIS,1,[ ])
> +      fi;;
> +    UnixWare) AC_DEFINE(UNIXWARE,1,[ ]);;
> +  esac
> +
>   if test "$withval" != "no"; then
>     if test "$withval" = "yes"; then
>         ODBC_INCDIR=/usr/local/birdstep/include
> @@ -350,7 +366,12 @@
>     ODBC_INCLUDE=-I$ODBC_INCDIR
>     ODBC_TYPE=birdstep
>     ODBC_LFLAGS=-L$ODBC_LIBDIR
> -
>   ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
> +    if test -e "$ODBC_LIBDIR/libCrdbc32.so" -o -e
> "$ODBC_LIBDIR/libCrdbc32.sl"; then
> +
>     ODBC_LIBS="-lCrdbc32 -lCadm32 -lCncp32 -lCrm32 -lCsql32 -lCdict32 -lCrdm32
> -lCrpc32 -lutil"
> +    elif test -e "$ODBC_LIBDIR/libCrdbc.so" -o -e
> "$ODBC_LIBDIR/libCrdbc.sl"; then
> +
>     ODBC_LIBS="-lCrdbc -lCadm -lCncp -lCrm -lCsql -lCdict -lCrdm -lCrpc -lutil"
> +    fi
> +
>     AC_DEFINE(HAVE_BIRDSTEP,1,[ ])
>
>     AC_MSG_RESULT(yes)
> Index: ext/odbc/php_odbc.h
> ===================================================================
> RCS file: /repository/php-src/ext/odbc/php_odbc.h,v
> retrieving revision 1.58
> diff -u -r1.58 php_odbc.h
> --- ext/odbc/php_odbc.h 8 Jan 2004 17:32:34 -0000       1.58
> +++ ext/odbc/php_odbc.h 11 Apr 2005 17:47:11 -0000
> @@ -33,8 +33,8 @@
> extern zend_module_entry odbc_module_entry;
> #define odbc_module_ptr &odbc_module_entry
>
> -#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
> defined(HAVE_UNIXODBC)
> -# define PHP_ODBC_HAVE_FETCH_HASH 1
> +#if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) ||
> defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP)
> +#define PHP_ODBC_HAVE_FETCH_HASH 1
> #endif
>
> /* user functions */

---

## #15966 — Albert Lash — 2005-04-15T13:46:14+00:00

URL: https://externals.io/message/15947#15966 · In reply to: #15965

Hi Jani,

Its all set. I've got back and fixed the problems I was getting while
compiling, so there are now no existing lines of code commented out. There
are several that were removed, all having something to do with
SWFMovie_output, for example:

#ifdef HAVE_NEW_MING
	RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL,
limit));
#else
	RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL));
#endif

It is now simplified as :

RETURN_LONG(SWFMovie_output(movie, &phpByteOutputMethod, NULL));

This is because the SWFMovie_output function no longer has this last
argument, as seen in ming/php_ext/ming.c line 620.

The patch is online:

http://people.thirteen.net/~alby/php_ext_ming.patch

You can download a bzip2 compressed version also:

http://people.thirteen.net/~alby/php_ext_ming.patch.bz2

From here, the FLV function needs to be added, but I haven't found time to
do so.

Regards,

Alby



>
>      I have committed a little bit modified version of this
>      patch in all branches. Basically I just replaced your two
>      'uname' calls by using $host_alias and used $SHLIB_SUFFIX_NAME
>      instead of .so / .sl.
>
>      --Jani
>
>
> 
>
> > […]
