Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2000 18:06:34 +0800 (CST)
From:      Yung-Jeng Hung <winard@ritax.dorm.ccu.edu.tw>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/16980: add Sybase database support to apache13-php3
Message-ID:  <200002251006.SAA78191@ritax.dorm.ccu.edu.tw>

next in thread | raw e-mail | index | archive | help

>Number:         16980
>Category:       ports
>Synopsis:       add Sybase database support to apache13-php3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 25 02:10:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Yung-Jeng Hung
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
CCU CSIE, Taiwan
>Environment:

FreeBSD ritax.dorm.ccu.edu.tw 3.4-STABLE FreeBSD 3.4-STABLE #1: Wed Feb 16 09:42:20 CST 2000     root@ritax.dorm.ccu.edu.tw:/usr/src/sys/compile/Ritax  i386

>Description:

This is patch that lets Sybase/MSSQL functions work in apache13-php3.
It uses DB-Lib or CT-Lib of FreeTDS.

>How-To-Repeat:

>Fix:
	
diff -ruN apache13-php3/patches/patch-ar apache13-php3.new/patches/patch-ar
--- apache13-php3/patches/patch-ar	Thu Jan  1 08:00:00 1970
+++ apache13-php3.new/patches/patch-ar	Fri Feb 25 17:38:20 2000
@@ -0,0 +1,29 @@
+--- ../php/functions/sybase.c.orig	Sat Jan  1 12:31:17 2000
++++ ../php/functions/sybase.c	Wed Feb 23 03:32:45 2000
+@@ -366,7 +366,7 @@
+ 				RETURN_FALSE;
+ 			}
+ 			/* create the link */
+-			if ((sybase.link=dbopen(sybase.login,host))==FAIL) {
++			if ((sybase.link=tdsdbopen(sybase.login,host))==FAIL) {
+ 				/*php3_error(E_WARNING,"Sybase:  Unable to connect to server:  %s",sybase_error(sybase));*/
+ 				efree(hashed_details);
+ 				dbloginfree(sybase.login);
+@@ -408,7 +408,7 @@
+ #if BROKEN_SYBASE_PCONNECTS
+ 				log_error("PHP/Sybase:  Persistent link died, trying to reconnect...",php3_rqst->server);
+ #endif
+-				if ((sybase_ptr->link=dbopen(sybase_ptr->login,host))==FAIL) {
++				if ((sybase_ptr->link=tdsdbopen(sybase_ptr->login,host))==FAIL) {
+ #if BROKEN_SYBASE_PCONNECTS
+ 					log_error("PHP/Sybase:  Unable to reconnect!",php3_rqst->server);
+ #endif
+@@ -464,7 +464,7 @@
+ 			RETURN_FALSE;
+ 		}
+ 		
+-		if ((sybase.link=dbopen(sybase.login,host))==NULL) {
++		if ((sybase.link=tdsdbopen(sybase.login,host))==NULL) {
+ 			/*php3_error(E_WARNING,"Sybase:  Unable to connect to server:  %s",sybase_error(sybase));*/
+ 			efree(hashed_details);
+ 			RETURN_FALSE;
diff -ruN apache13-php3/patches/patch-as apache13-php3.new/patches/patch-as
--- apache13-php3/patches/patch-as	Thu Jan  1 08:00:00 1970
+++ apache13-php3.new/patches/patch-as	Fri Feb 25 17:38:23 2000
@@ -0,0 +1,20 @@
+--- ../php/configure.orig	Fri Feb 25 14:51:07 2000
++++ ../php/configure	Fri Feb 25 14:51:37 2000
+@@ -9206,7 +9206,7 @@
+    	fi
+     SYBASE_CT_INCLUDE=-I$SYBASE_CT_INCDIR
+     SYBASE_CT_LFLAGS="-L$SYBASE_CT_LIBDIR"
+-    SYBASE_CT_LIBS="-lcs -lct -lcomn -lintl"
++    SYBASE_CT_LIBS="-lct"
+     old_LDFLAGS=$LDFLAGS
+     LDFLAGS="$LDFLAGS -L$SYBASE_CT_LIBDIR"
+     echo $ac_n "checking for netg_errstr in -ltcl""... $ac_c" 1>&6
+@@ -9247,7 +9247,7 @@
+    SYBASE_CT_LIBS="$SYBASE_CT_LIBS -ltcl" 
+ else
+   echo "$ac_t""no" 1>&6
+- SYBASE_CT_LIBS="$SYBASE_CT_LIBS -lsybtcl" 
++#  SYBASE_CT_LIBS="$SYBASE_CT_LIBS -lsybtcl" 
+ fi
+ 
+     echo $ac_n "checking for insck__getVdate in -linsck""... $ac_c" 1>&6
diff -ruN apache13-php3/scripts/configure.php apache13-php3.new/scripts/configure.php
--- apache13-php3/scripts/configure.php	Fri Feb 25 17:03:40 2000
+++ apache13-php3.new/scripts/configure.php	Fri Feb 25 17:39:47 2000
@@ -24,6 +24,8 @@
 MySQL		"PHP:    MySQL database support" ON \
 PostgreSQL	"PHP:    PostgreSQL database support" OFF \
 mSQL		"PHP:    mSQL database support" OFF \
+SybaseDB	"PHP:    Sybase/MSSQL database support via DB-Lib" OFF \
+SybaseCT	"PHP:    Sybase/MSSQL database support via CT-Lib" OFF \
 dBase		"PHP:    dBase database support" OFF \
 OpenLDAP	"PHP:    OpenLDAP support" OFF \
 SNMP		"PHP:    SNMP support" OFF \
@@ -100,6 +102,14 @@
 		\"mSQL\")
 			echo "BUILD_DEPENDS+=	msql:\${PORTSDIR}/databases/msql"
 			echo "PHP_CONF_ARGS+=	--with-msql=\${PREFIX}"
+			;;
+		\"SybaseDB\")
+			echo "LIB_DEPENDS+=	db.0:\${PORTSDIR}/databases/freetds"
+			echo "PHP_CONF_ARGS+=	--with-sybase=\${PREFIX}"
+			;;
+		\"SybaseCT\")
+			echo "LIB_DEPENDS+=	ct.0:\${PORTSDIR}/databases/freetds"
+			echo "PHP_CONF_ARGS+=	--with-sybase-ct=\${PREFIX}"
 			;;
 		\"dBase\")
 			echo "PHP_CONF_ARGS+=	--with-dbase"


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002251006.SAA78191>