php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47668 PHP has encountered an Access Violation
Submitted: 2009-03-15 22:08 UTC Modified: 2009-03-15 22:11 UTC
From: keith at atyourservicetech dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.9 OS: Windows Server 2003
Private report: No CVE-ID: None
 [2009-03-15 22:08 UTC] keith at atyourservicetech dot com
Description:
------------
This is an issue more with mySQL than php, but figured a help should be posted here as well:

The libmysql.dll file that ships with teh Windows binary is not compatible with php5.  If mysql appears in the path directive PRIOR to the php directory, php5 will run into access violations.  To remidy the problem, one of the two following solutions can be applied:

1) Make sure the php5 directory appears BEFORE the mysql directory in the PATH environment variable, or

2) Copy the libmysql.dll file from the php5 directory to the mysql directory.

I searched HOURS for this and only found ONE obscure reference to it!  Figured I would post it out here for all!

Keith Clark


Reproduce code:
---------------
Any php code that attempts to access mysql databases

Actual result:
--------------
PHP has encountered an Access Violation at .......

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-15 22:11 UTC] pajoye@php.net
"The libmysql.dll file that ships with teh Windows binary is not
compatible with php5."

It is. The problem is to use the MySQL DLL with PHP. Don't do that, ever.

And no bug > bogus.
 [2010-04-26 02:08 UTC] fredsilsbee at yahoo dot com
changing the order in the path worked...thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 07:01:32 2024 UTC