php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53108 Can't compile php_pdo_dlib NTS VC6
Submitted: 2010-10-20 08:22 UTC Modified: 2010-12-20 12:59 UTC
From: mikhail dot v dot gavrilov at gmail dot com Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 5.3.3 OS: Windows
Private report: No CVE-ID: None
 [2010-10-20 08:22 UTC] mikhail dot v dot gavrilov at gmail dot com
Description:
------------
I wan't use freeTDS provider for MSSQL databse (for *nix and also Windows).
Can't compile php_pdo_dblib, because file sybdb.lib is missing.


Test script:
---------------
D:\php-sdk\php53dev\vc6\x86\php-5.3.3>configure "--enable-snapshot-build" "--ena
ble-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-m
ssql" "--without-pdo-mssql" "--without-pi3web" "--with-enchant=shared" "--enable
-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static" "--with-db
lib=shared" "--with-pdo-dblib=shared"
snapshot: forcing one-shot on
snapshot: forcing aolserver on
snapshot: forcing apache on
snapshot: forcing apache2filter on
snapshot: forcing apache2-2filter on
snapshot: forcing apache2handler on
snapshot: forcing apache2-2handler on
snapshot: forcing apache-hooks on
snapshot: forcing cli-win32 on
snapshot: forcing embed on
snapshot: forcing bz2 on
snapshot: forcing curl on
snapshot: forcing dba on
snapshot: forcing fileinfo on
snapshot: forcing gettext on
snapshot: forcing gmp on
snapshot: forcing mhash on
snapshot: forcing imap on
snapshot: forcing interbase on
snapshot: forcing intl on
snapshot: forcing ldap on
snapshot: forcing mbstring on
snapshot: forcing mbregex on
snapshot: forcing --disable-mbregex-backtrack shared
snapshot: forcing oci8 on
snapshot: forcing oci8-11g on
snapshot: forcing openssl on
snapshot: forcing pgsql on
snapshot: forcing pspell on
snapshot: forcing shmop on
snapshot: forcing snmp on
snapshot: forcing sockets on
snapshot: forcing sqlite3 on
snapshot: forcing sybase-ct on
snapshot: forcing tidy on
snapshot: forcing exif on
snapshot: forcing mysql on
snapshot: forcing mysqli on
snapshot: forcing pdo on
snapshot: forcing pdo-firebird on
snapshot: forcing pdo-mysql on
snapshot: forcing pdo-oci on
snapshot: forcing pdo-odbc on
snapshot: forcing pdo-pgsql on
snapshot: forcing pdo-sqlite on
snapshot: forcing pdo-sqlite-external on
snapshot: forcing phar-native-ssl on
snapshot: forcing soap on
snapshot: forcing sqlite on
snapshot: forcing xmlrpc on
snapshot: forcing xsl on
Saving configure options to config.nice.bat
Checking for cl.exe ...  <in default path>
  Detected compiler MSVC6 (Visual C++ 6.0)
  Detected 32-bit compiler
Checking for link.exe ...  C:\Program Files\Microsoft Visual Studio\VC98\bin
Checking for nmake.exe ...  <in default path>
Checking for lib.exe ...  <in default path>
Checking for bison.exe ...  <in default path>
Checking for re2c.exe ...  <in default path>
  Detected re2c version 0.13.5
Checking for zip.exe ...  <in default path>
Checking for lemon.exe ...  <not found>
Checking for mc.exe ...  C:\Program Files\Microsoft SDK\Bin
 
Build dir: D:\php-sdk\php53dev\vc6\x86\obj\Release
PHP Core:  php5.dll and php5.lib
 
Checking for wspiapi.h ...  <in default path>
Enabling IPv6 support
WARNING: AOLSERVER module requires an --enable-zts build of PHP
 
Checking for httpd.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library ApacheCore.lib ... <not found>
WARNING: Could not find apache libraries/headers
 
WARNING: Apache2 module requires an --enable-zts build of PHP on windows
 
WARNING: Apache2 module requires an --enable-zts build of PHP on windows
 
WARNING: Apache2 module requires an --enable-zts build of PHP on windows
 
WARNING: Apache2 module requires an --enable-zts build of PHP on windows
 
Checking for httpd.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library ApacheCore.lib ... <not found>
WARNING: Could not find apache libraries/headers
 
Enabling SAPI sapi\cgi
Enabling SAPI sapi\cli
Enabling SAPI sapi\cli
Enabling SAPI sapi\embed
Enabling extension ext\bcmath
Checking for library libbz2_a.lib;libbz2.lib ... ..\deps\lib\libbz2.lib
Checking for bzlib.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\bz2 [shared]
Enabling extension ext\calendar
Checking for library oleaut32.lib ... <in LIB path> OleAut32.Lib
Enabling extension ext\com_dotnet
Checking for mscoree.h ...  <not found>
Checking for mscoree.h ...  <not found>
Enabling extension ext\ctype
Checking for library libcurl_a.lib;libcurl.lib ... ..\deps\lib\libcurl_a.lib
Checking for curl/easy.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library ssleay32.lib ... ..\deps\lib\ssleay32.lib
Checking for library libeay32.lib ... ..\deps\lib\libeay32.lib
Checking for library winmm.lib ... <in LIB path> WinMM.Lib
Checking for library wldap32.lib ... <in LIB path> Wldap32.Lib
Enabling extension ext\curl [shared]
Enabling extension ext\date
Checking for library libdb31s.lib ... <not found>
WARNING: dba not enabled; libraries and headers not found
 
Checking for enchant.h ...  <not found>
Checking for enchant.h ...  <not found>
WARNING: Could not find enchant.h; skipping
 
Enabling extension ext\ereg
Checking for dirent.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library dirent_a.lib ... ..\deps\lib\dirent_a.lib
Enabling extension ext\fileinfo [shared]
Enabling extension ext\filter
Enabling extension ext\ftp
Checking for library libjpeg_a.lib;libjpeg.lib ... ..\deps\lib\libjpeg.lib
Checking for library freetype_a.lib;freetype.lib ... ..\deps\lib\freetype_a.lib
Checking for library libpng_a.lib;libpng.lib ... ..\deps\lib\libpng_a.lib
Checking for gd.h ...  ext\gd\libgd
Checking for png.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\libpng12
Checking for library libiconv_a.lib;libiconv.lib ... ..\deps\lib\libiconv_a.lib
Checking for iconv.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library T1_StaticMD.lib ... <not found>
WARNING: t1lib not enabled; libraries and headers not found
 
Checking for library User32.lib ... <in LIB path> User32.Lib
Checking for library Gdi32.lib ... <in LIB path> Gdi32.Lib
Enabling extension ext\gd [shared]
Checking for library libintl_a.lib;libintl.lib ... ..\deps\lib\libintl_a.lib
Checking for libintl.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\gettext [shared]
Checking for library mpir_a.lib ... <not found>
WARNING: GMP not enabled; libraries and headers not found
 
Enabling extension ext\hash
Checking for library libiconv_a.lib ... ..\deps\lib\libiconv_a.lib
Checking for iconv.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\iconv
Checking for library cclient_a.lib;cclient.lib ... ..\deps\lib\cclient_a.lib
Checking for c-client.h ...  <not found>
Checking for c-client.h ...  <not found>
Checking for c-client/c-client.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library winmm.lib ... <in LIB path> WinMM.Lib
Checking for library ws2_32.lib ... <in LIB path> WS2_32.Lib
Checking for library Secur32.lib ... <in LIB path> Secur32.Lib
Checking for library crypt32.lib ... <in LIB path> Crypt32.Lib
Enabling extension ext\imap [shared]
AC_DEFINE[HAVE_NEW_MIME2TEXT]=1: is already defined to 1
Checking for ibase.h ...  <not found>
Checking for ibase.h ...  <not found>
WARNING: interbase not enabled; libraries and headers not found
 
Checking for library icuuc.lib ... ..\deps\lib\icuuc.lib
Checking for unicode/utf.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\intl [shared]
Enabling extension ext\json
Checking for ldap.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\openldap
Checking for lber.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\openldap
Checking for library ssleay32.lib ... ..\deps\lib\ssleay32.lib
Checking for library libeay32.lib ... ..\deps\lib\libeay32.lib
Checking for library oldap32_a.lib ... ..\deps\lib\oldap32_a.lib
Checking for library olber32_a.lib ... ..\deps\lib\olber32_a.lib
Checking for library libsasl.lib ... <not found>
WARNING: ldap not enabled; libraries and headers not found
 
Enabling extension ext\mbstring [shared]
Checking for mcrypt.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library libmcrypt_a.lib;libmcrypt.lib ... ..\deps\lib\libmcrypt_a.l
ib
Checking for library Advapi32.lib ... <in LIB path> AdvAPI32.Lib
Enabling extension ext\mcrypt
Checking for library dblib.lib ... ..\deps\lib\dblib.lib
Checking for sybfront.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\mssql (via ext\dblib) [shared]
Checking for library ws2_32.lib ... <in LIB path> WS2_32.Lib
Enabling extension ext\mysqlnd
Checking for oci.h ...  <not found>
Checking for oci.h ...  <not found>
WARNING: oci8 not enabled: Oracle Database libraries or Oracle 10g Instant Clien
t not found
 
Checking for oci.h ...  <not found>
Checking for oci.h ...  <not found>
WARNING: oci8-11g not enabled: Oracle Database libraries or Oracle 11g Instant C
lient not found
 
Checking for library odbc32.lib ... <in LIB path> odbc32.lib
Checking for library odbccp32.lib ... <in LIB path> odbccp32.lib
Checking for sql.h ...  <in default path>
Checking for sqlext.h ...  <in default path>
Enabling extension ext\odbc
Checking for library ssleay32.lib ... ..\deps\lib\ssleay32.lib
Checking for library libeay32.lib ... ..\deps\lib\libeay32.lib
Checking for openssl/ssl.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\openssl [shared]
Enabling extension ext\pcre
Checking for library libpq.lib ... ..\deps\lib\libpq.lib
Checking for libpq-fe.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\pgsql
Enabling extension ext\pgsql [shared]
Checking for pspell.h ...  <not found>
Checking for pspell.h ...  <not found>
WARNING: pspell not enabled; libraries and headers not found
 
Enabling extension ext\reflection
Enabling extension ext\session
Enabling extension ext\shmop [shared]
Checking for snmp.h ...  <in default path>
Checking for library netsnmp.lib ... <not found>
Checking for library libsnmp.lib ... <not found>
WARNING: snmp not enabled; libraries and headers not found
 
Checking for library ws2_32.lib ... <in LIB path> WS2_32.Lib
Checking for winsock.h ...  <in default path>
Enabling extension ext\sockets [shared]
Enabling extension ext\spl
Enabling extension ext\sqlite3 [shared]
Checking for timelib_config.h ...  ext/date/lib
Enabling extension ext\standard
Checking for oniguruma.h ...  ext\mbstring\oniguruma
Checking for ctpublic.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for library libcs.lib ... <not found>
WARNING: sybase_ct not enabled; libraries and headers not found
 
Checking for library libtidy_a.lib;libtidy.lib ... ..\deps\lib\libtidy_a.lib
Checking for tidy.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\tidy [shared]
Enabling extension ext\tokenizer
Checking for zlib.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\zip
Checking for library zlib_a.lib;zlib.lib ... ..\deps\lib\zlib_a.lib
Checking for zlib.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\zlib
Checking for library libxml2_a_dll.lib;libxml2_a.lib ... ..\deps\lib\libxml2_a_d
ll.lib
Checking for library libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib ... ..\de
ps\lib\libiconv_a.lib
Checking for libxml/parser.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\libxml
Enabling extension ext\dom
Enabling extension ext\exif [shared]
Enabling extension ext\mysql [shared]
        using mysqlnd build
Enabling extension ext\mysqli [shared]
        mysqlnd build
Enabling extension ext\pdo
Checking for library sybdb.lib ... <not found>
WARNING: pdo_dblib not enabled, libraries or headers not found
 
Checking for library fbclient_ms.lib ... <not found>
Checking for library gds32_ms.lib ... <not found>
WARNING: pdo_firebird not enabled; libraries and headers not found
 
INFO: mysqlnd build
Enabling extension ext\pdo_mysql [shared]
Checking for oci.h ...  <not found>
Checking for oci.h ...  <not found>
WARNING: pdo-oci not enabled; libraries and headers not found
 
Checking for library odbc32.lib ... <in LIB path> odbc32.lib
Checking for library odbccp32.lib ... <in LIB path> odbccp32.lib
Checking for sql.h ...  <in default path>
Checking for sqlext.h ...  <in default path>
Enabling extension ext\pdo_odbc [shared]
Checking for library libpq.lib ... ..\deps\lib\libpq.lib
Checking for libpq-fe.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\pgsql
Enabling extension ext\pdo_pgsql [shared]
Checking for pg_config.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include\pgsql
Enabling extension ext\pdo_sqlite [shared]
Checking for sqlite3.h ...  <not found>
Checking for sqlite3.h ...  <not found>
WARNING: pdo-sqlite-external support can't be enabled, libraries or headers are
missing
 
Enabling extension ext\phar
Checking for library libeay32st.lib ... <not found>
WARNING: Could not enable native OpenSSL support in Phar
 
Enabling extension ext\simplexml
Enabling extension ext\soap [shared]
Enabling extension ext\sqlite [shared]
Enabling extension ext\wddx
Checking for timelib_config.h ...  ext/date/lib
Enabling extension ext\xml
Enabling extension ext\xmlreader
Checking for xmlrpc.h ...  ext\xmlrpc/libxmlrpc
Checking for iconv.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\xmlrpc [shared]
Checking for libxml/xmlwriter.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\xmlwriter
Checking for library libxslt_a.lib ... ..\deps\lib\libxslt_a.lib
Checking for library libexslt_a.lib ... ..\deps\lib\libexslt_a.lib
Checking for libxslt\xslt.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Checking for libexslt\exslt.h ...  D:\php-sdk\php53dev\vc6\x86\deps\include
Enabling extension ext\xsl [shared]
 
Creating build dirs...
Generating files...
Generating Makefile
Generating main/internal_functions.c
        [content unchanged; skipping]
Generating main/config.w32.h
Done.
 
 
 
Enabled extensions:
-----------------------
| Extension  | Mode   |
-----------------------
| bcmath     | static |
| bz2        | shared |
| calendar   | static |
| com_dotnet | static |
| ctype      | static |
| curl       | shared |
| date       | static |
| dblib      | shared |
| dom        | static |
| ereg       | static |
| exif       | shared |
| fileinfo   | shared |
| filter     | static |
| ftp        | static |
| gd         | shared |
| gettext    | shared |
| hash       | static |
| iconv      | static |
| imap       | shared |
| intl       | shared |
| json       | static |
| libxml     | static |
| mbstring   | shared |
| mcrypt     | static |
| mysql      | shared |
| mysqli     | shared |
| mysqlnd    | static |
| odbc       | static |
| openssl    | shared |
| pcre       | static |
| pdo        | static |
| pdo_mysql  | shared |
| pdo_odbc   | shared |
| pdo_pgsql  | shared |
| pdo_sqlite | shared |
| pgsql      | shared |
| phar       | static |
| reflection | static |
| session    | static |
| shmop      | shared |
| simplexml  | static |
| soap       | shared |
| sockets    | shared |
| spl        | static |
| sqlite     | shared |
| sqlite3    | shared |
| standard   | static |
| tidy       | shared |
| tokenizer  | static |
| wddx       | static |
| xml        | static |
| xmlreader  | static |
| xmlrpc     | shared |
| xmlwriter  | static |
| xsl        | shared |
| zip        | static |
| zlib       | static |
-----------------------
 
 
Enabled SAPI:
-------------
| Sapi Name |
-------------
| cgi       |
| cli       |
| cli_win32 |
| embed     |
-------------
 
 
------------------------------------------
|               |                        |
------------------------------------------
| Build type    | Release                |
| Thread Safety | No                     |
| Compiler      | MSVC6 (Visual C++ 6.0) |
| Architecture  | x86                    |
------------------------------------------
 
 
Type 'nmake snap' to build a PHP snapshot


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-20 11:32 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-10-20 11:32 UTC] pajoye@php.net
It is not something we provide. This data is not available anymore. We also stoped to support these drivers on Windows in php 5.3 and later.

I would suggest to go with SqlSrv (http://sqlsrvphp.codeplex.com/) on Windows, it supports PDO as well. Doctrine and many other projects support it these days.
 [2010-10-21 18:38 UTC] mikhail dot v dot gavrilov at gmail dot com
FreeTDS provider better than driver from Microsoft.
Reasons:
1) Microsoft driver couldn't convert fieldnames to client's encoding.
2) FreeTDS better, because then easier to port Web applications to Linux.
Please don't drop this data provider, I and many other open source programmers 
ready make donations for continues support.
M$ really sucks.
 [2010-10-21 18:43 UTC] pajoye@php.net
1) is not correct, as far as I remember it does support UTF-8 for fields too.

For 2), that's why PDO exists or Doctrine.

It is not our decisions to drop it. But I'm not willing to provide freetds support on Windows. We don't have the resources for that (and all the support it requires, given the pain it is to use ftds) and SqlServer guys provide an out of the box driver and are very reactive to any feature requests.
 [2010-10-21 19:11 UTC] mikhail dot v dot gavrilov at gmail dot com
1) Example:
I have table wich fields names have CP1251 encoding
--Table: dbo.adres
CREATE TABLE dbo.adres (
 [Column 0]                    varchar(50),
 [Системный номер]             varchar(50),
 [Фамилия]                     varchar(50),
 [Имя]                         varchar(50),
 [Отчество]                    varchar(50),
 [День рождения]               varchar(50),
 [Срок регистрации]            varchar(50),
 [Регистрация или пребывание]  varchar(50),
 [Район]                       varchar(50),
 [Город]                       varchar(50),
 [Село]                        varchar(50),
 [Улица]                       varchar(50),
 [Дом]                         varchar(50),
 [Корпус]                      varchar(50),
 [Квартира]                    varchar(50),
 [ОВД регистрации]             varchar(50),
 [Паспорт серия]               varchar(50),
 [Паспорт номер]               varchar(50),
 [ОВД выдачи]                  varchar(50),
 [Дата выдачи]                 varchar(50),
 [Смена фамилии]               varchar(50),
 [Прочие причины]              varchar(50),
 [Дата изменения записи]       varchar(50),
 [Дата прописки]               varchar(50),
 [Вид адресного листка]        varchar(50),
 [Column 25]                   varchar(50)
)
GO
Microsoft data provider get all fields as is e.g. CP1251 it is wrong, FreeTDS 
convert to UTF-8 and it is true.

2) I wrote framework for developing banking application. In realization FreeTDS 
and MS provider i found many difference:
a) Freetds provider does not allow the use of attributes as: 
PDO::ATTR_PERSISTENT...
b) Freetds provider does not allow use beginTransaction() in this case better 
overwrite this functions with selfs SQL framework realisation.

If FreeTDS will available on Windows platform, Windows fan boys know about this 
problem and write more compatible crossplatform code.

Sorry for offtopic.
---

I solve subject problem: For compilation php_pdo_bdlib.dll you must build 
dblib.lib, rename to sybdb.lib and put to build lib directory.

Good luck
 [2010-10-21 20:09 UTC] pajoye@php.net
I will have to test or ask to test encoding and field names.

In any case, if you use a framework you should definitively rely on SqlSrv (given that the encoding works or will be fixed if not). FreeTDS won't make it on php for Windows.
 [2010-10-21 21:01 UTC] mikhail dot v dot gavrilov at gmail dot com
The controversial proposal, for me more important is application correctly 
working  in * nix, than any special optimisation's for windows platform. sqlsrv 
can't give me single correctly working code for both platforms.
 [2010-12-20 12:59 UTC] jani@php.net
-Package: Tidy +Package: MSSQL related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC