Bug #78423 [Asn]: ODBC functions work without extension=odbc

From: Date: Sat, 17 Aug 2019 16:42:54 +0000
Subject: Bug #78423 [Asn]: ODBC functions work without extension=odbc
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222292@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78423&edit=1 ID: 78423 Updated by: cmb@php.net Reported by: dpfender44 at gmail dot com Summary: ODBC functions work without extension=odbc Status: Assigned Type: Bug Package: PHP options/info functions Operating System: Windows 10 PHP Version: 7.4.0beta2 Assigned To: cmb Block user comment: N Private report: N New Comment: D:\Users\cmb>curl -L -s --output php-7.3.9RC1-nts-Win32-VC15-x64.zip https://windows.php.net/downloads/qa/php-7.3.9RC1-nts-Win32-VC15-x64.zip D:\Users\cmb>7z x -ophp-7.3.9RC1-nts-Win32-VC15-x64 php-7.3.9RC1-nts-Win32-VC15-x64.zip > nul D:\Users\cmb>cd php-7.3.9RC1-nts-Win32-VC15-x64 D:\Users\cmb\php-7.3.9RC1-nts-Win32-VC15-x64>php --ini Configuration File (php.ini) Path: C:\WINDOWS Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none) D:\Users\cmb\php-7.3.9RC1-nts-Win32-VC15-x64>php -m | findstr odbc D:\Users\cmb\php-7.3.9RC1-nts-Win32-VC15-x64>php -r "odbc_connect();" Fatal error: Uncaught Error: Call to undefined function odbc_connect() in Command line code:1 Stack trace: #0 {main} thrown in Command line code on line 1 Previous Comments: ------------------------------------------------------------------------ [2019-08-17 15:59:32] dpfender44 at gmail dot com There is only one php.ini file and Fast CGI is use in IIS to process PHP files. When I initially saw the problem, I tried changing the php.ini file to enable and then disable the extension=odbc line and saw no difference. I even powered off the computer and then back on with the extension disabled and it still works. I also searched the php.ini file for all occurrences of the string 'odbc' looking for another string that might enable it, but found none. Testing on the same system with PHP 7.3.8 and the same PHP script, it detects when the function 'odbc_connect' is not available when changing the php.ini option. PHP 7.3.9RC1 and 7.4.0beta2 have the same symptom. I did not submit this bug report until I tested all 3 versions of PHP using the same PHP script. ------------------------------------------------------------------------ [2019-08-17 15:38:14] requinix@php.net To make sure, 1. There is no other extension=odbc line in there, 2. There are no other INI files being loaded, and 3. If you modify that same php.ini and reload IIS/FPM, you see the changes reflected in code? ------------------------------------------------------------------------ [2019-08-17 15:34:39] dpfender44 at gmail dot com Two versions have the same symptom. php-7.3.9RC1-nts-Win32-VC15-x64.zip php-7.4.0beta2-nts-Win32-vs16-x64.zip I have double checked the php.ini being used and php.ini has ";extension=odbc". ------------------------------------------------------------------------ [2019-08-17 07:02:14] cmb@php.net The ODBC extension is still supposed to be compiled as DLL (and as such has to be explicitly loaded). This is the case with php-7.4.0beta2-nts-Win32-vs16-x64. Which exact version did you try? Have you double-checked, that the desired php.ini is used? ------------------------------------------------------------------------ [2019-08-16 23:59:01] dpfender44 at gmail dot com Description: ------------ In both PHP versions 7.3.9RC1 and 7.4.0beta2, the php.ini file does not have the ODBC (extension=odbc) configured, but the ODBC functions work properly. If the ODBC module is now part of the core PHP system, then the extension=odbc option in the php.ini file needs to be removed. In PHP version 7.3.8, the extension=odbc option must be specified in php.ini. I have done testing of ODBC functions on all three versions of PHP on the same computer system. I just reconfigure the Fast CGI module of the IIS web server to switch between PHP versions. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78423&edit=1

« previous php.bugs (#222292) next »