Bug #78423 [Nab]: ODBC functions work without extension=odbc
| From: | dpfender44 at gmail dot com | Date: | Sun, 18 Aug 2019 22:34:12 +0000 |
| Subject: | Bug #78423 [Nab]: ODBC functions work without extension=odbc | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222312@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
User updated by: dpfender44 at gmail dot com
Reported by: dpfender44 at gmail dot com
Summary: ODBC functions work without extension=odbc
Status: Not a bug
Type: Bug
Package: ODBC related
Operating System: Windows 10
PHP Version: 7.4.0beta2
Block user comment: N
Private report: N
New Comment:
I just found something in the IIS configuration regarding FastCGI Settings that was the cause of my
problems. I never had any problems with multiple PHP versions on one system because the php.ini file
always had the same options specified until I started testing ODBC processing. All is now resolved
and there is no problem with any of the PHP software. This affected all of the PHP versions
installed on my system.
Previous Comments:
------------------------------------------------------------------------
[2019-08-18 21:18:00] dpfender44 at gmail dot com
The only place php.ini files exist are in the directories that contain PHP programs (php.exe).
There are no registry keys or environment variables related to php.ini files. I do not know what
kind of search php.exe or php-cgi.exe does to find php.ini files. It must be Windows or IIS that
keeps a copy in cache and uses it when one is not found in the folder where php-cgi.exe exists. The
only thing that I can do with multiple versions of PHP on the same system is to make sure that a
php.ini file only exists in the one currently configured in IIS for Fast CGI processing.
------------------------------------------------------------------------
[2019-08-18 20:38:19] cmb@php.net
I suggest to check the php.ini search location docs[1]. If your
case isn't documented there, please report a respective doc bug.
Thanks.
[1] <https://www.php.net/manual/en/configuration.file.php>
------------------------------------------------------------------------
[2019-08-18 19:05:52] requinix@php.net
Good to hear you got that sorted out.
------------------------------------------------------------------------
[2019-08-18 18:27:09] dpfender44 at gmail dot com
I have solved the problem. I have 3 versions of PHP installed on my system in 3 folders: C:/PHP738,
C:/PHP739, C:/PHP740. I removed all php.ini files and then my script fails because odbc is not
loaded. I then added back the php.ini into C:/PHP738 (which has odbc enabled) and then the PHP
7.4.0 web server loads the php.ini info from folder C:/PHP738 and the script works. It must be
something in Windows or IIS that is finding a copy of php.ini in a cache and using it instead of
what is in the folder for the version of PHP being used by IIS.
Sorry for all the grief that I have caused, but this was a really strange situation.
------------------------------------------------------------------------
[2019-08-18 10:20:57] cmb@php.net
With the additional information, this looks like ODBC is not
compiled statically. You can verify that with ProcessExplorer[1]
which probably shows that php_odbc.dll is loaded.
Anyhow, I actually tested with IIS now, and the ODBC extension is
only available if I add
extension=odbc to php.ini (and restart
IIS). So this looks like a configuration issue on your machine.
[1] <https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78423
--
Edit this bug report at https://bugs.php.net/bug.php?id=78423&edit=1