php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56928 Memory error in execute statement
Submitted: 2006-03-29 11:07 UTC Modified: 2006-03-30 02:28 UTC
From: k1ngrs at ntlworld dot com Assigned:
Status: Closed Package: PDO_MYSQL (PECL)
PHP Version: 5.1.1 OS: windows2000
Private report: No CVE-ID: None
 [2006-03-29 11:07 UTC] k1ngrs at ntlworld dot com
Description:
------------
Sqlite pdo works fine but for some reason the mysql pdo driver will not work and fails on the execute statement:

The instruction at "0x00e221aa" reference memory at "0x0000007b". The memory could not be "read".

I have the lastest windows dlls for all 3 files (5.1.1.1)
php_pdo.dll, php_pdo_sqlite.dll and php_pdo_mysql.dll

The php binary came from the Gnope website release 1.0
(includes PHP 5.1.1 (built: Nov 27 2005 21:39:02)) 

Regards

Rob

Reproduce code:
---------------
<?php
$user="root";
$pass="12345";
$db = new PDO('mysql:host=localhost;dbname=mysql', $user, $pass);
$sth = $db->prepare("select * from user");
$sth->execute();
?>

Expected result:
----------------
No output expected.

Actual result:
--------------
The instruction at "0x00e221aa" reference memory at "0x0000007b". The memory could not be "read".


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-29 11:09 UTC] k1ngrs at ntlworld dot com
MySql version is 4.1.12a running on port 3306
 [2006-03-29 12:55 UTC] wez@php.net
Thank you for taking the time to report a problem with the package.
Unfortunately you are not using a current version of the package -- 
the problem might already be fixed. Please download a new
version from http://pecl.php.net/packages.php

If you are able to reproduce the bug with one of the latest
versions, please change the package 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 PECL.

You're not running the latest version.
In addition, PHP 5.1.3 is due soon; for best results, please try the snapshot from http://snaps.php.net.
 [2006-03-29 16:57 UTC] k1ngrs at ntlworld dot com
Hi Wez,
I have succeeded in getting it to work fine with 2 other PCs running WinXp tonight, php 5.1.1, mysql 4.1.18 so I will investigate further on my PC at work which runs Win2K. I think the OS may not be the issue, could just be a rogue DLL somewhere.

I am limited to using php 5.1.1. because the build for gnope includes this.

Chances are, this is not a problem with the driver, I was just looking for some direction on fixing the error. 
php-gtk2 is very fragile and will not allow you even the slightest error, and will give a memory error for most errors a lot of the time rather than an error message.

Regards

Rob
 [2006-03-30 02:28 UTC] k1ngrs at ntlworld dot com
Hi Wez,
Solution found!
The libmysql.dll was missing from the php directory.
I copied the libmysql.dll from the mysql bin directory and it now works fine. 

I have just checked the Gnope forum and found a post which states that the version 1.0 Gnope distro of php 5.1.1 does not include the mysql extension and you need get the following from the standard php 5.1.1 distribution:
php_mysql.dll (ext directory) - only needed for embeded mysql
libmysql.dll (php directory) - required by both pdo and embeded 



Regards

Rob
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 01:03:38 2021 UTC