php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46842 calls to mysql_connect crash
Submitted: 2008-12-12 07:58 UTC Modified: 2009-01-06 21:52 UTC
Votes:8
Avg. Score:4.8 ± 0.7
Reproduced:8 of 8 (100.0%)
Same Version:8 (100.0%)
Same OS:6 (75.0%)
From: pdp2108 at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.8 OS: win32 only - Windows XP SP2
Private report: No CVE-ID:
 [2008-12-12 07:58 UTC] pdp2108 at gmail dot com

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-15 21:19 UTC] adrian at cozuweb dot com
I have exactly the same problem, just my Apache server version is 2.2.11.

just wanted to add that if I run the script using the cli (php.exe) :

php -f dbtest.php
 
it works perfectly.
If I access the same file using the web server I get the access violation.

The content of dbtest.php is:
<?php
  $connection = mysql_connect("ponchs","root","At1fT43"); 
 echo "$connection";
?>
I started with a clean installation of the three packages, everything else seems to be running fine
 [2008-12-16 18:22 UTC] michail1982 at gmail dot com
I not shure, that is a PHP bug... Thats happends, when i use libMysql.dll from Mysql source.. when i use this dll from prevous Mysql (5.0.51b) it`s OK
PS go to Mysql site :)

PPS Sorry? my english is bad
 [2008-12-26 04:05 UTC] yottabytewizard at mybboard dot net
Had this problem too.

The new libmysql.dll seems to be messed up. I ended using the libmysql.dll version included in PHP 5.2.6.

I just upgraded to the latest versions of Apache(2.2.11), PHP (5.2.8) and MySQL (5.1.11), but using the dll from php 5.2.6.
 [2009-01-06 21:16 UTC] savitski at mail dot ru
The problem appears if and only if the Apache process uses another libmysql.dll than shipped with PHP 5.2.8 package.

To solve the problem keep only libmysql.dll in PHP home dir and delete others.

Of course you could check which dll is used before you start delete (for example with help of freeware "Process Explorer" from Microsoft site). In my case the DLL was loaded from MySQL installation path but not PHP.
 [2009-01-06 21:52 UTC] pajoye@php.net
Never use other DLLs than the one we ship.
 [2010-03-21 12:33 UTC] anatoly dot deryshev at gmail dot com
You must copy libmysql.dll from php installation folder to apache bin folder
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 15:01:54 2014 UTC