|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75858 Enabling opcache in PHP v7.1 returns MS-SQL driver errors
Submitted: 2018-01-22 22:49 UTC Modified: 2020-11-13 17:22 UTC
From: bahead at gmail dot com Assigned: cmb (profile)
Status: Closed Package: opcache
PHP Version: 7.1.13 OS: Windows Server 2012
Private report: No CVE-ID: None
 [2018-01-22 22:49 UTC] bahead at gmail dot com
MS-SQL driver version or file name: php_pdo_sqlsrv_71_nts.dll - File version (32 bit)
SQL Server version: Microsoft SQL Server Express (64-bit) - 13.0.4206.0
Client operating system: Windows Server 2012 64-bit
PHP version: 7.1
Microsoft ODBC Driver version: 13

I'm upgrading an existing website from PHP v5.6 to v7.1. The only changes are the PHP version and the version of the MS-SQL PHP drivers.

Everything works as expected (as per previous site), except when I enable Zend opcache in php.ini. When I enable it, the site returns one of two error messages:

SQLSTATE[08001]: [Microsoft][ODBC Driver 13 for SQL Server]SQL Server Network Interfaces: Not enough storage is available to process this command. 1
or occasionally
Fatal error: No ODBC error was found 

The existing PHP v5.6 site has opcache enabled using MS-SQL drivers and does not return errors. Changing opcache settings in PHP v7.1 has no effect on the errors. If I disable Zend opcache, the errors disappear.  They only present themselves when opcache is enabled.

Test script:
try {
$conn = new PDO('sqlsrv:server='.MSSQL_SERVER.'; Database='.MSSQL_DB, MSSQL_USER, MSSQL_PWD);
catch(Exception $e)
{ die( print_r( $e->getMessage() ) ); }


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-13 15:59 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-11-13 15:59 UTC]
Is that still an issue with any of the actively supported PHP
versions[1], and the latest stable PDO_SQLSRV (5.8.1)?

[1] <>
 [2020-11-13 17:10 UTC] bahead at gmail dot com
-Status: Feedback +Status: Assigned
 [2020-11-13 17:10 UTC] bahead at gmail dot com
The issue was resolved for me by using sqlsrv drivers 5.3 (php_pdo_sqlsrv_72_ts_x64.dll).
 [2020-11-13 17:22 UTC]
-Status: Assigned +Status: Closed
 [2020-11-13 17:22 UTC]
Thanks for the swift reply!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 02:01:32 2024 UTC