|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-06-03 12:57 UTC] php at eklenet dot de
Description:
------------
hi,
i got the error :
PHP has encountered an Access Violation at 01B849C7
on some sqls.
i have tried some php-version, 5.2.4, 5.2.5, 5.2.6 and php5.2-win32-latest.zip, on IIS ISAPI and Apache2 Mod, all the same.
i think the the error must be in the PDO prepare statement, as you see a "A" is show with the SQL in the actual result, but never a "B" at the last line
The attatched output is complete.
The reproduce code is just a part of a big script.
Reproduce code:
---------------
...
$this->CONNECTION['handle'] =$dbh = new PDO('odbc:bluesheet', "sa","xxxx");
...
echo "A:$sql:";
$this->CONNECTION['response'] = $this->CONNECTION['handle']->prepare($sql);
echo "B";
$this->CONNECTION['response']->execute();
echo "C";
...
Expected result:
----------------
no error and correctly executed sqls.
Actual result:
--------------
PHP has encountered an Access Violation at 01B849C7A:SELECT id,name FROM bs_companies;:BCA:SELECT
id,name FROM bs_users;:BCA:SELECT * FROM bs_salesmans;:BCA:INSERT INTO
bs_access_log
(
func ,
ip ,
ip_for ,
session ,
php_session ,
browser ,
login ,
date
) VALUES (
'muster_stueckliste_edit' /* func */ ,
'192.168.224.4' /* ip */ ,
'' /* ip_for */ ,
'e9bc10605d413039c338efeaef5abef0' /* session */ ,
'8b1q4n09vhpvba2dqgfl7sh6t5' /* php_session */ ,
'Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14' /* browser
*/ ,
'1' /* login */ ,
getdate() /* date */
)
:BCA:SELECT
[function]
FROM
bs_functions4user
WHERE
user_id = '1'
:BCA:UPDATE
bs_stueckliste
SET
parent_id = '32' ,
stueck = '2' ,
details = '2' ,
einheit = '2' ,
verbrauch = DEFAULT ,
groese = '2' ,
farbe = DEFAULT ,
positions = DEFAULT ,
anz = DEFAULT
WHERE
id = '5' AND
ident = '64'
:
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
hello, i dont think its a internal problem from PHP. Becouse i need to get my script work, i have made a externel script to fetch data from the database. Here is sample code: ------------------------------------------------------ public function run($sql) { echo " A"; $this->CONNECTION['lastsql']= rawurlencode(base64_encode($sql)); if(substr(strtoupper($sql),0,6)=="INSERT" OR substr(strtoupper($sql),0,6)=="UPDATE") { $type="get_field"; $sql = ($this->CONNECTION['lastsql']); $url = "http://192.168.224.4/bluesheet/sql.php?type=$type&sql=$sql"; $data = file_get_contents($url); } echo " B"; } ------------------------------------------------------ so you see here is no database connection. The Output of the Script is just: PHP has encountered an Access Violation at 01B849C7 A B A B A B A As you see it ends with A and not B so there musst be an internal PHP Problem not related to the Database !