|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8126 [PATCH] undefined symbol: dbopen
Submitted: 2000-12-05 14:13 UTC Modified: 2001-05-02 15:53 UTC
From: raz at harbourfront dot on dot ca Assigned: vlad (profile)
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.0.3pl1 OS: redhat 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: raz at harbourfront dot on dot ca
New email:
PHP Version: OS:


 [2000-12-05 14:13 UTC] raz at harbourfront dot on dot ca
when i load apache, i get : 
cannot load into server: undefiend symbol: dbopen
httpd could not be started.

I have apache 1.3.14 and php 4.0.3pl1.

apache configure..
./configure --prefix=/www --enable-module=so

php configure..
./configure --with-apxs=/www/bin/apxs --with-sybase=/usr/local/freetds

I have freetds 0.51.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-11 14:11 UTC]
Reclassify. --with-sybase is dblib, not ctlib.
 [2000-12-11 14:11 UTC]
Reclassify. --with-sybase is dblib, not ctlib.
 [2001-05-01 19:40 UTC]
Patch for the problem below. Please, review.

Apparently, dbopen() might or might not exist, depending on how you install FreeTDS. Sometimes FreeTDS provides you with tdsdbopen() instead.

The patch checks, if tdsdbopen() is available (a config.m4 modification), and, if yes, uses it. If not, it falls back to using dbopen().

Does anyone have objections to the way I implemented it (it's kinda crude, with #define, but I think this is the cleanest I can get). If someone has objections, please speak now.

If nobody has objections, someone with enough karma, please apply the patch (or give me karma and I'll apply it myself).

diff -urN php-4.0.5-tdsbroken/ext/sybase/config.m4 php-4.0.5/ext/sybase/config.m4
--- php-4.0.5-tdsbroken/ext/sybase/config.m4	Mon May  1 21:27:02 2000
+++ php-4.0.5/ext/sybase/config.m4	Tue May  1 16:28:14 2001
@@ -21,4 +21,8 @@
+  AC_CHECK_LIB(sybdb, tdsdbopen, 
+     [ AC_DEFINE(PHP_SYBASE_DBOPEN,tdsdbopen,[ ])
+       AC_DEFINE(DBMFIX,1,[ ]) ],
+     [ AC_DEFINE(PHP_SYBASE_DBOPEN,dbopen,[ ]) ])
diff -urN php-4.0.5-tdsbroken/ext/sybase/php_sybase_db.c php-4.0.5/ext/sybase/php_sybase_db.c
--- php-4.0.5-tdsbroken/ext/sybase/php_sybase_db.c	Sun Feb 25 22:07:24 2001
+++ php-4.0.5/ext/sybase/php_sybase_db.c	Tue May  1 15:42:54 2001
@@ -379,7 +379,7 @@
 			/* create the link */
-			if ((,host))==FAIL) {
+			if ((,host))==FAIL) {
 				/*php_error(E_WARNING,"Sybase:  Unable to connect to server:  %s",sybase_error(sybase));*/
@@ -415,7 +415,7 @@
 			sybase_ptr = (sybase_link *) le->ptr;
 			/* test that the link hasn't died */
 			if (DBDEAD(sybase_ptr->link)==TRUE) {
-				if ((sybase_ptr->link=dbopen(sybase_ptr->login,host))==FAIL) {
+				if ((sybase_ptr->link=PHP_SYBASE_DBOPEN(sybase_ptr->login,host))==FAIL) {
 					/*php_error(E_WARNING,"Sybase:  Link to server lost, unable to reconnect");*/
 					zend_hash_del(&EG(persistent_list), hashed_details, hashed_details_length+1);
@@ -462,7 +462,7 @@
-		if ((,host))==NULL) {
+		if ((,host))==NULL) {
 			/*php_error(E_WARNING,"Sybase:  Unable to connect to server:  %s",sybase_error(sybase));*/

 [2001-05-02 15:53 UTC]
Fixed in CVS

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Oct 05 02:01:24 2023 UTC