msphpsql: Faulting module name: ODBC32.dll
Hi,
I have posted this bug on php.net portal : https://bugs.php.net/bug.php?id=74710
I can send you more stacktrace or analysis informations from debugdiag or procmon explorer…
The most important to keep is : i use pdo_sqlsrv pre-release from latest 4.2.0 (https://github.com/Microsoft/msphpsql/releases/tag/v4.2.0-preview) and test many before.
Everytime php-cgi process failed with Faulting application path: C:\PHP\php-cgi.exe Faulting module path: C:\Windows\SYSTEM32\ODBC32.dll
Do you have any idea about this bug?
Regards
David
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 80 (30 by maintainers)
Commits related to this issue
- Let go of a potential reference to a db resource. We had a problem in our app using the pdo_sqlsrv driver with PHP 7 that manifested itself by a ODBC32.dll crash at the end of a PHP request (see is... — committed to nicoder/ADOdb by nicoder 7 years ago
- Release a potential reference to a db resource We had a problem in our app using the pdo_sqlsrv driver with PHP 7 that manifested itself by a ODBC32.dll crash at the end of a PHP request (see issue: ... — committed to ADOdb/ADOdb by nicoder 7 years ago
Hi all,
We are currently actively working on a fix for this issue. For now, we seem to have found the cause of this problem and we are hoping to have the fix ready in a preview release near the end of the month. Please stay tune.
A new release which should fix this issue is now available. You can download it from here, windows downloads available from here or here. Please let us know if the problem occurs again. Thanks!
@ezison The error you describe occurs because a transaction is started in Management Studio, and then a PHP script is run on the same table before the first transaction has been committed. When you commit this transaction:
The PHP script will work as intended. I do not think this is related to the ‘Faulting module name’ error, which we are continuing to investigate.
Hi @yitam ,
Seems to be good for us after few install. Thanks a lot for your job @david-puglielli @yitam and others like me. Do you planned any release for that because front of customer, tag preview is not symbol to quality 😦
Regards
Thanks @yitam , we had the same problems (with php 7.2.9 and sqlsrv 5,3,0). With 5.4.0-preview our tests are all passing.
Thanks @bstoney and @yitam
We’ll try to launch our test suite and manual check asap.
Regards
Thanks @yitam , my tests are all passing with 5.4.0-preview. 👍
Thanks @dga26 for getting back to us. We suspect it’s a similar issue with the one reported by @bstoney above (also only happened with php 7.2*). We are planning to release a preview with the fix for that, so please stay tuned.
In the meantime, you might want to send us some typical queries that you run on a regular basis. That would help us investigate.
Thanks heaps @yitam, I will verify the fix as soon as the next preview is available. I really appreciate your efforts.
Hi @bstoney I could finally track exactly why it crashed – freeing a SQLHANDLE when it had already been freed earlier. However, the cause(s) remain unclear to me, and my suspicions are similar to what you said. Thanks for your input. Please stay tuned.
Hi @dga26 , I thought the original issue (executing an invalid query in a transaction) was fixed in 5.1.2-preview. Did you mean this version worked for several week and suddenly it didn’t work anymore? or this problem only occurs in 5.2-rc? If this problem is happening on 5.1.2-preview, I think this is a different problem than the original one. Would you mind providing us a repro script of what your customer tried to do? If this is only happening on 5.2-rc, then I will investigate what code was introduced in between that may cause this regression.
Thanks.
hi @dga26 according to your comment I believe this issue has been resolved?
Hi,
I upgraded PHP from 5.6 to 7.0.24 on my development machine today and have similar problem - PHP crashes randomly with following errors in Application log:
There are only few SELECT statements on the page.
Apache/2.4.28 (Win32) OpenSSL/1.0.2l mod_fcgid/2.3.9 Windows 10 pro 64 bit PHP: 7.0.24 NTS Extension: php_pdo_sqlsrv_7_nts_x86.dll MS SQL Server Express 2014
Update: Same issue with PHP 7.1 No issue with SQLSRV driver (7.0, 7.1) at all
Hi,
(I work with @dga26 on this problem.)
for some more details, here is the pull request containing our change to ADOdb: https://github.com/ADOdb/ADOdb/pull/379
If I understand correctly, it seems that if our app (or a library as was the case here) retains a reference to a PDO statement, it sometimes happens that that reference / statement is garbage-collected after the PDO disconnection / garbage collection, and then the dll crashes.
I have no idea, do you think it would be possible to modify the pdo_sqlsrv driver (i guess) to avoid a crash when this happens?
Thanks a lot, nico
same issue here:
Hi
good news !
after many tries … we succeed to reproduce with very simple code (not good code sure but 100% efficient 😉 )
Fails
When
Then
Succeed with normal exception:
When :
Then
Uncaught PDOException: SQLSTATE[42S22]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid column name 'CURDATESucceed too with
Regards
Sure i’m not using transaction as normal case but the error doesn’t raise correctly
Same here.
Brand new Server2012R2 with php7.1
Same as above I had to downgrade to v 5.6 to make the pages work.
hi @Hadis-Fard, @ulvii
We are in our application using adodb (lens) to interface app and database plugged with pdo_sqlsrv driver. I remove all
__destructjob andregister_shutdown_functionwithout success.I cannot send you the whole application but i’ll try to minimize the code to reproduce a very special case…only reproducible by the interface with the same scheme
Thanks for your answers