Bug #73191 [NEW]: "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro
From: eion at robbmob dot com
Operating system: Windows
PHP version: 7.0.11
Package: ODBC related
Bug Type: Bug
Bug description:"SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" with Foxpro
Description:
------------
Every query with odbc_exec() that returns a string is outputting a PHP
Warning of "SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH" when
using the Foxpro driver.
The full error is
[28-Sep-2016 19:15:10 Pacific/Auckland] PHP Warning: odbc_exec():
SQLColAttribute can't handle SQL_DESC_OCTET_LENGTH: [S1091]
[Microsoft][ODBC Visual FoxPro Driver]Descriptor type out of range in
test.php on line 2
Looking at
https://github.com/php/php-src/blob/master/ext/odbc/php_odbc.c#L1018
php_error_docref(NULL, E_WARNING, "SQLColAttribute can't handle
SQL_DESC_OCTET_LENGTH: [%s] %s", state, errtxt);
It appears that this warning should actually be a notice, or have some
way of blocking this message. This warning was added in
http://git.php.net/?p=php-src.git;a=commit;h=268eb1999b1598a2a1a875c5f0172d5b615811ac
Test script:
---------------
<?php
$a = odbc_connect('Foxpro', '', '');
odbc_exec($a, "SELECT foo FROM bar");
--
Edit bug report at https://bugs.php.net/bug.php?id=73191&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73191&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73191&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73191&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73191&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73191&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73191&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73191&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73191&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73191&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73191&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73191&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73191&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73191&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73191&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73191&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73191&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73191&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73191&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73191&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73191&r=mysqlcfg
Thread (6 messages)
- eion at robbmob dot com