PHP 5.3.10 patch to support sybase_next_result ()

Sybase ASE database management system supports multiple result sets, however the implementation of Sybase in PHP does not. An error has been reported about this problem, and this report also contains a fix (https://bugs.php.net/bug.php?id=48675). The patch is for version 5.2.9, and I tried to add it to version 5.3.10. The source builds without warnings or errors, and testing the new function "sybase_next_result ()" does not lead to the fatal error "Calling the function undefined". This assumes that the function is implemented, but does not work properly.

Configuration:

configure --disable-isapi --enable-debug-pack --without-mssql --without-pdo-mssql --without-pi3web --with-mcrypt=static --disable-static-analyze --enable-cli --with-sybase-ct=%SYBASE%\%SYBASE_OCS%

There is a notification in sybase_query () when there are several result sets that say: "Sybase: unexpected results that cancel the current in ...". The first result is obtained. And this notification is returned even without a patch.

The number of stored procedures in the database that return multiple result sets is extensive, and the best solution would be sybase_next_result (). In short, I'm looking for the equivalent of "mssql_next_result ()" (http://se2.php.net/manual/en/function.mssql-execute.php) for Sybase in PHP 5.3.10.

It is worth noting that the other parts of the Sybase implementation are in place and work properly.

My test environment is a WAMP server (Windows 7, Apache 2.21, MySQL 5.5.20, PHP 5.3.10), and Sybase ASE is version 15.7.0.

Is there anyone who has "decided" this?

Regarding // Jonas

+3
1

Update:

"OutputDebugString()" (http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs .85).aspx) DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647).

, 'sybase_next_result()',

if (sybase_ptr->active_result_index) {
    ...
}

. , ( ).

retcode = ct_results(sybase_ptr->cmd, &restype);

'retcode' 'CS_FAIL'. , ,

ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *, sybase_link_index, id, "Sybase-Link", le_link, le_plink);

sybase_ptr sutch, "retcode" "CS_FAIL".

+1

All Articles