php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12095 mssql_pconnect access violations
Submitted: 2001-07-12 06:41 UTC Modified: 2002-08-13 23:19 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php at rawhide dot cjb dot net Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.0.6 OS: Win2k Pro SP2
Private report: No CVE-ID: None
 [2001-07-12 06:41 UTC] php at rawhide dot cjb dot net
Firstly, I realise there are previous bug reports regarding this topic but I wasn't sure if I (a normal user) could re-open them manually. So I'll start a new topic.

I submitted what I thought was a bug earlier about PHPCGI pconns not remaining persistent. Well after again attempting to move to ISAPI I encountered access violations similar to the ones described in bug #8755.

Running my scripts (which use mssql_pconnect) it would, seemingly, chose from an error at random from:

- An access violation
- A warning regarding something like DB-LIBRARY

After a while the script would no longer work. Something strange though is the fact that after a while I can access a script on the server which only outputs phpinfo() BUT I cannot access the script running the db calls in question.

Attempting to restart w3svc fails, it waits and waits like windows usually does :) and after a while fails to respond. Successive calls to net stop w3svc result in "The service could not be controlled in its present state." (even though its still responding to phpinfo.php).

I'm currently in this state as I write, I'll reboot and attempt to get the exact error messages.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-12 07:11 UTC] php at rawhide dot cjb dot net
The initial call was OK. A second call after the first had finished was also fine. A third call after the second had finished resulted in:

PHP has encountered an Access Violation at 0109B434
Warning:  MS SQL:  Link to server lost, unable to reconnect in [filename deleted] on line 18

The line in question is the mssql_pconnect. A 4th call resulted in the same.

5th: fine.

6th: PHP has encountered an Access Violation at 73342F43

7: fine

8: PHP has encountered an Access Violation at 73342F43

9:
Warning: MS SQL: Link to server lost, unable to reconnect in [filename deleted] on line 18
couldn't connect to db ()

(the couldn't connect to db () line is an error trap in the script, the bracket is supposed to contain mssql_get_last_message)

10:
Warning: MS SQL error: Invalid parameter in DB-LIBRARY function reference. (severity 11) in [2nd filename deleted] on line 12
Warning: MS SQL: Unable to set query in [2nd filename deleted] on line 12

This line in question is a query called after pconnect'ing. The warning repeats for every query on the page.

11: PHP has encountered an Access Violation at 733251C0
12: PHP has encountered an Access Violation at 73342F43
13: PHP has encountered an Access Violation at 73342F43
14: Fine
15: PHP has encountered an Access Violation at 73342F43
16: PHP has encountered an Access Violation at 73342F43
17: PHP has encountered an Access Violation at 73342F43
...

It occasionally switched between fine, violation at 73342F43 and violation at 0109B434 (seen on call number 3).

I was unable to get it to lock the web service again.
 [2001-07-12 07:19 UTC] php at rawhide dot cjb dot net
Sorry for the spam if these modifications are going to an email list. I would have posted this specific update but the error only just appeared.

dllhost.exe - Application Error
The instruction at "0x010a64d5" referenced memory at "0x00000010". The memory could not be "read".

This happened while not doing anything web related, but I'm pretty sure it's related to the mssql_pconnect facet of PHP since dllhost.exe is related to IIS. I'm guessing there's some sort of timeout on persistent connections? this error is most likely occuring through the timeout?

</amateur>
 [2001-07-12 19:49 UTC] php at rawhide dot cjb dot net
PHP exhibits this behaviour under Apache-win32 1.3.20 aswell (running as a module). Although with different symptoms.

When pconnect is used instead of connect it runs fine once and doesn't disconnect from the db but on the second call Apache causes an error:

Instruction at 0x733251C0, couldn't read memory at 0x0000023C.

Unforunately these two numbers change, the instructionn address seems to always be in the vicinity of 0x733..... however.

After closing the error dialog with 'Ok', the page continues to load fine.
 [2002-08-13 23:19 UTC] kalowsky@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 20:01:28 2019 UTC