|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20826 update statement in mssql_query causes Access Violation
Submitted: 2002-12-05 07:12 UTC Modified: 2002-12-05 10:59 UTC
From: pyfra at web dot de Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.3.0RC2 OS: Windows 2000 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pyfra at web dot de
New email:
PHP Version: OS:


 [2002-12-05 07:12 UTC] pyfra at web dot de
Since I upgraded from 4.23 to 4.3.0RC2 PHP is causing a lot of SQL-trouble. We are using MS SQL-Server 2000/IIS/Win2000Server/PHP4.3.0-ORC2(isapi). 

The trouble mainly is caused by using the UPDATE statement. Example: 

	$statement = "
UPDATE table1 
SET name1 = 'anything' 
WHERE name1 = 'something'

Returns 'PHP has encountered an Access Violation at 01A95154' in the browser window but the PHP-script dows not execute anything after the query. 
Strange enough a check of the database shows the query itself being successful. 

If I now replace 
	$var = mssql_query($statement,$dbh);
the script continues working and everything seems to be ok. 

But having an update statement in a loop you will have to change the name of the variable (called $var above), otherwise this fails after the first loop. 
Further problems occuring with mssql-queries in selfdefined functions ... the above workaround seems not to work in functions.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-05 08:44 UTC]
Please try using this CVS snapshot:
For Windows:
 [2002-12-05 10:17 UTC] pyfra at web dot de
Thank you very much! Whatever the reason was, the problem seems to have disappeared after update to 4.4.0-dev. :-)
 [2002-12-05 10:59 UTC]
Closing then. The fix was also merged to the STABLE branch so it will be in 4.3.0 too.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 04:01:34 2024 UTC