From: sergiopaternoster73 at gmail dot com
Operating system: Ubuntu 18.04 Server
PHP version: 8.0.3
Package: PDO ODBC
Bug Type: Bug
Bug description:Compile errors/warnings with unixODBC
Description:
------------
Simple configure (and unixODBC 2.3.9 previously compiled in
/usr/local).
The compile ends eventually but I have some instability in using ODBC.
sudo ./configure --prefix=/usr/local/php/8.0.3 \
--disable-cgi \
--enable-debug \
--disable-opcache \
--enable-mbstring \
--with-pdo_odbc=unixODBC,/usr/local \
--with-unixODBC=/usr/local \
--with-iconv \
--without-pdo-sqlite \
--disable-phar
It generates a list of warnings (which I think are related to my
ODBC/Unicode issues on php8):
/bin/bash /home/edsradmin/software/php/php-8.0.3/libtool --silent
--preserve-dup-deps --mode=compile cc -Iext/pdo_odbc/
-I/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/
-I/home/edsradmin/software/php/php-8.0.3/include
-I/home/edsradmin/software/php/php-8.0.3/main
-I/home/edsradmin/software/php/php-8.0.3
-I/home/edsradmin/software/php/php-8.0.3/ext/date/lib
-I/usr/include/libxml2
-I/home/edsradmin/software/php/php-8.0.3/ext/mbstring/libmbfl
-I/home/edsradmin/software/php/php-8.0.3/ext/mbstring/libmbfl/mbfl
-I/home/edsradmin/software/php/php-8.0.3/TSRM
-I/home/edsradmin/software/php/php-8.0.3/Zend -Wno-clobbered -Wall
-Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough
-Wno-unused-parameter -Wno-sign-compare -g -fvisibility=hidden -O0
-DZEND_SIGNALS -I/home/edsradmin/software/php/php-8.0.3/ext
-I/usr/local/include -DPDO_ODBC_TYPE=\"unixODBC\" -c
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c -o
ext/pdo_odbc/odbc_driver.lo
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c: In
function âpdo_odbc_fetch_error_funcâ:
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:42:36:
warning: format â%ldâ expects argument of type âlong intâ, but
argument 5 has type âSDWORD {aka int}â [-Wformat=]
message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
~~^
%d
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:44:18:
einfo->what, einfo->last_error,
~~~~~~~~~~~~~~~~~
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c: In
function âpdo_odbc_errorâ:
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:88:41:
warning: pointer targets in passing argument 4 of âSQLGetDiagRecâ
differ in signedness [-Wpointer-sign]
rc = SQLGetDiagRec(htype, eh, recno++, einfo->last_state,
&einfo->last_error,
^~~~~
In file included from /usr/local/include/sqlext.h:43:0,
from /usr/local/include/sqlucode.h:784,
from
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/php_pdo_odbc_int.h:51,
from
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:27:
/usr/local/include/sql.h:726:24: note: expected âSQLCHAR * {aka
unsigned char *}â but argument is of type âchar *â
SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE
Handle,
^~~~~~~~~~~~~
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:89:4:
warning: pointer targets in passing argument 6 of âSQLGetDiagRecâ
differ in signedness [-Wpointer-sign]
einfo->last_err_msg, sizeof(einfo->last_err_msg)-1, &errmsgsize);
^~~~~
Expected result:
----------------
No errors
--
Edit bug report at https://bugs.php.net/bug.php?id=80876&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80876&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80876&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80876&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80876&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80876&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80876&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80876&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80876&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80876&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80876&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80876&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80876&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80876&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80876&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80876&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80876&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80876&r=mysqlcfg