ID: 6505
Updated by: joey
Status: Closed
Bug Type: Sybase (dblib) related
PHP Version: 4.0 Latest CVS (02/09/2000)
Assigned To: 

I realize this is a closed bug, but I think it is appropriate
to note here that thanks to Vlad, the last comment here is
no longer required. See bug #8126 for details.

Previous Comments:

[2001-05-02 18:45:07] [EMAIL PROTECTED]
probably should close the report, though I have not tried the patch.  The newer 
versions of FreeTDS and PHP work, so long as (per the Spanish contribution to the 
mssql_connect section of the manual), I edit


to replace all three occurrences of "dbopen" with "tdsdbopen".


[2001-05-02 16:18:29] [EMAIL PROTECTED]
Looks like since setting the charset is not often used, it is a bug in the library 
that went unnoticed. Here is an idea:

Patch your include/sybdb.h for FreeTDS. The patch is a one-liner (against version 

--- old.h       Wed Oct 18 19:35:34 2000
+++ sybdb.h     Wed May  2 13:15:42 2001
@@ -298,6 +298,7 @@
 extern RETCODE    DBSETLUSER(LOGINREC *login, char *username);
 extern RETCODE    DBSETLHOST(LOGINREC *login, char *hostname);
 extern RETCODE    DBSETLAPP(LOGINREC *login, char *application);
+extern  RETCODE    DBSETLCHARSET(LOGINREC *login, char *charset);
 #ifdef DBMFIX
 extern DBPROCESS *tdsdbopen(LOGINREC *login,char *server);

If you succeed, please, report this to the author of FreeTDS, and close the bug report.


[2000-12-06 21:43:09] [EMAIL PROTECTED]
This is dblib, not ctlib


[2000-09-02 15:37:59] [EMAIL PROTECTED]
see also bug report # 6069.


[2000-09-02 15:32:11] [EMAIL PROTECTED]
I am trying to compile using freetds to eventually access an MS SQL server.

for freetds (v.0.5)

./configure --prefix=/usr/local/freetds/ --enable-msdblib --with-tdsver=4.2

for php 4 (latest CVS 2/9/2000)
 ./configure --with-apxs --with-mysql --enable-track-vars 
--with-config-file-path=/etc/php4/apache --with-sybase=/usr/local/freetds

export SYBASE=/usr/local/freetds

I edited the /usr/local/freetds/interfaces file to set up the MS SQL server address.  
I fixed httpd.conf to have the sybase interfaces file be /usr/local/freetds/interfaces

when I stop apache and run 
apachectl configtest

I get the following output

Syntax error on line 108 of /etc/apache/httpd.conf:
Cannot load /usr/lib/apache/1.3/ into server: 
/usr/lib/apache/1.3/ undefined symbol: DBSETLCHARSET

Brian Bruns, the author of freetds, suggested a library problem and attempting to fix 
it by exporting the SYBASE and LD_LIBRARY_PATH variables.  But this does not work.

The only place in the source that I can find DBSETLCHARSET is in file
at line 354:
 but I don't know enough about programming to figure out what sybase.login and charset 
are needed here, or even to know if this is the offending line.

thanks for any help you can give me.  I have been trying for a long time to find a 
reliable way to send queries from PHP to a Microsoft SQL server that resides on 
another machine and to which I only have read access.


The remainder of the comments for this report are too long.  To view the rest of the 
comments, please view the bug report online.

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to