php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41825 Invalid Access to memory Location
Submitted: 2007-06-27 14:30 UTC Modified: 2007-06-27 21:04 UTC
From: rahulkorlipara at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.3 OS: Windows Server 2003 R2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rahulkorlipara at gmail dot com
New email:
PHP Version: OS:

 

 [2007-06-27 14:30 UTC] rahulkorlipara at gmail dot com
Description:
------------
ENVIRONMENT
Windows 2003 Server R2
IIS 6.0
MySQL 5.0.41
PHP 5.2.3

PROBLEM
All extensions except those for mysql working

ERRORS FROM LOG: 
[27-Jun-2007 02:59:18] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\runtimes\php\phpext\php_mysql.dll' - Invalid access to memory location.

 in Unknown on line 0

[27-Jun-2007 02:59:18] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\runtimes\php\phpext\php_mysqli.dll' - Invalid access to memory location.

 in Unknown on line 0

[27-Jun-2007 02:59:18] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\runtimes\php\phpext\php_ffi.dll' - The specified module could not be found.

 in Unknown on line 0



ATTEMPTS
- replaced php_mysql.dll & php_mysqli.dll in the ext folder from php 5.2.3 win32 distribution
- extensions folder location provided to the ext folder in php.ini
- provided 'full control' privileges to 'Everyone' to ext folder
- both extensions enables in php.ini
- both php folder and mysql/bin folder in Windows PATH
- Replaced extension dlls with latest several times
- Replaced libmysql.dll several times in the mysql/bin folder
- Did a repair on using MySQL Windows installer
- Restarted IIS as well as Server several times after every change

OTHER PEOPLE WITH THE SAME PROBLEM
http://forums.mysql.com/read.php?11,102233,159429#msg-159429

Reproduce code:
---------------
test.php

<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'username', 'password')
    or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('databasename') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM tablename';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "\t<tr>\n";
    foreach ($line as $col_value) {
        echo "\t\t<td>$col_value</td>\n";
    }
    echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>


Expected result:
----------------
"Connected successfully" 

the table's contents



Actual result:
--------------
None. Blank page is returned. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-27 14:34 UTC] scottmac@php.net
This is a bug in MySQL 5.0.41 that prevents libmysql.dll being loaded correctly, use the libmysql.dll supplied with PHP rather than the one supplied with MySQL.
 [2007-06-27 14:37 UTC] scottmac@php.net
You can find more information on the MySQL bug at http://bugs.mysql.com/bug.php?id=28358
 [2007-06-27 20:52 UTC] rahulkorlipara at gmail dot com
Scott - Thank you. Thank you. Thank you. Thank you. Thank you. Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 11:01:29 2024 UTC