php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62379 Test bug - ext/pdo_odbc/tests/long_columns.phpt
Submitted: 2012-06-21 06:42 UTC Modified: 2012-07-14 09:39 UTC
From: mattficken@php.net Assigned: ab (profile)
Status: Closed Package: *Compile Issues
PHP Version: 5.4.4 OS: Windows
Private report: No CVE-ID: None
 [2012-06-21 06:42 UTC] mattficken@php.net
Description:
------------
There is a logic error in common.phpt where it can return $config without defining 
$CONFIG['ENV']['PDOTEST_DSN'] in which case pdotest.inc fails.

The patch fixes this and adds a check to long_columns.phpt to skip the test if 
PDOTEST_DSN is not defined.

Actual result:
--------------
001+ Notice: Undefined index: ENV in C:\Users\matt\Downloads\php-test-pack-5.4-
nts-windows-vc9-x86-r041dd77\ext\pdo\tests\pdo_test.inc on line 15
001- Finished
002+ 
003+ Warning: Invalid argument supplied for foreach() in 
C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc on line 15
004+ 
005+ Notice: Undefined index: ENV in C:\Users\matt\Downloads\php-test-pack-5.4-
nts-windows-vc9-x86-r041dd77\ext\pdo\tests\pdo_test.inc on line 72
006+ 
007+ Warning: Invalid argument supplied for foreach() in 
C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc on line 72
008+ 
009+ Fatal error: Uncaught exception 'PDOException' with message 'invalid data 
source name' in C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc:35
010+ Stack trace:
011+ #0 C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc(35): PDO->__construct('', NULL, NULL, NULL)
012+ #1 C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc(75): PDOTest::factory()
013+ #2 C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo_odbc\tests\long_columns.php(3): 
PDOTest::test_factory('ext/pdo_odbc/te...')
014+ #3 {main}
015+   thrown in C:\Users\matt\Downloads\php-test-pack-5.4-nts-windows-vc9-x86-
r041dd77\ext\pdo\tests\pdo_test.inc on line 35

Patches

62379.patch.txt (last revision 2012-07-12 22:02 UTC by mattficken@php.net)
long_columns.phpt.patch (last revision 2012-06-21 06:42 UTC by mattficken)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-21 11:35 UTC] ab@php.net
I think the patch is just partly correct, as PDOTEST_DSN isn't involved in that test. The DSN stuff is handled in the ext\pdo_odbc\tests\common.inc where it tries to create a MS access db under win. Adding the ENV key to the config only helps to get rid of that undefined index warning. Actually the test was going through for me and failed again :) with the diff:

001+ Failed on size 256:
001- Finished
002+ Expected 256 bytes, got 257
003+ 69696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
004+ 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
005+ Failed on size 257:
006+ Expected 257 bytes, got 259
007+ 6969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
008+ 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
009+ Failed on size 258:
010+ Expected 258 bytes, got 261
011+ 696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
012+ 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a20a483d792390200008a51d3924102000040020000dcf81273a00f00003c3a9a10fa040000000000000000000008020000da20f25c5a

Looks like 'ext/pdo/tests/pdo_test.inc' is used here only to include the PDOTest class.
 [2012-07-11 23:01 UTC] mattficken@php.net
I was able to install MS SQL Server ODBC driver on Linux (RHEL 6.2) and load it using PDO ODBC driver and connect to SQL Server 2008 & 2012, but I got the same error, below (additional info in error messages because its a different PDO driver).

Used these instructions to install MS SQL Server ODBC Driver: http://www.microsoft.com/en-us/download/details.aspx?id=28160

[Wed Jul 11 12:19:23 2012]  Script:  '/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/tests/long_columns.php'
---------------------------------------
/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c(685) : Block 0x7f4f9824d1a0 status:
Beginning:  	OK (allocated on /root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c:640, 257 bytes)
    Start:	OK
      End:	Overflown (magic=0x00000000 instead of 0x5AA4E353)
          	1 byte(s) overflown
---------------------------------------
Failed on size 256:
Expected 256 bytes, got 257
69696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
[Wed Jul 11 12:19:23 2012]  Script:  '/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/tests/long_columns.php'
---------------------------------------
/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c(685) : Block 0x7f4f921fc008 status:
Beginning:  	OK (allocated on /root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c:640, 258 bytes)
    Start:	OK
      End:	Overflown (magic=0x00000069 instead of 0x5AA4E353)
          	2 byte(s) overflown
---------------------------------------
Failed on size 257:
Expected 257 bytes, got 259
6969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
[Wed Jul 11 12:19:23 2012]  Script:  '/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/tests/long_columns.php'
---------------------------------------
/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c(685) : Block 0x7f4f921fbeb0 status:
Beginning:  	OK (allocated on /root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c:640, 259 bytes)
    Start:	OK
      End:	Overflown (magic=0x00000069 instead of 0x5AA4E353)
          	3 byte(s) overflown
---------------------------------------
Failed on size 258:
Expected 258 bytes, got 261
696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969
5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a
[Wed Jul 11 12:19:23 2012]  Script:  '/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/tests/long_columns.php'
---------------------------------------
/root/Downloads/php-src-PHP-5.4-66e1ac2/ext/pdo_odbc/odbc_stmt.c(685) : Block 0x7f4f921fc618 status:
Invalid pointer: ((size=0x00000259) != (next.prev=0x6969696969696969))
---------------------------------------
 [2012-07-12 22:02 UTC] mattficken@php.net
The following patch has been added/updated:

Patch Name: 62379.patch.txt
Revision:   1342130548
URL:        https://bugs.php.net/patch-display.php?bug=62379&patch=62379.patch.txt&revision=1342130548
 [2012-07-12 22:12 UTC] mattficken@php.net
The newest patch fixes this issue for me.

I have tested it with PHP_5_4:
Windows 7 x86
-all 3 MS Access Database drivers from Office 2010
-MySQL
-MS SQL Server Express 2008, 2008 Enterprise, 2012 Enterprise

RHEL 6.2 x64
-MySQL (MyODBC)
-MS SQL Server Enterprise 2008 and 2012 - patch has link to where to download Microsoft's UnixODBC driver for MS SQL Server
 [2012-07-13 13:46 UTC] ab@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src.git;a=commit;h=10251b20c3be842f1a8dbc43e2f4894fa41aa16b
Log: Fixed bug #62379 failing ODBC long column functionality
 [2012-07-14 09:39 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2012-07-14 09:39 UTC] ab@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2014-10-07 23:23 UTC] stas@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=10251b20c3be842f1a8dbc43e2f4894fa41aa16b
Log: Fixed bug #62379 failing ODBC long column functionality
 [2014-10-07 23:34 UTC] stas@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=10251b20c3be842f1a8dbc43e2f4894fa41aa16b
Log: Fixed bug #62379 failing ODBC long column functionality
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 09 17:05:54 2022 UTC