php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47882 calls to mysql_connect crash
Submitted: 2009-04-02 21:45 UTC Modified: 2009-04-03 13:48 UTC
From: ldjones at us dot ibm dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.9 OS: Windows XP SP3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ldjones at us dot ibm dot com
New email:
PHP Version: OS:

 

 [2009-04-02 21:45 UTC] ldjones at us dot ibm dot com
Description:
------------
I am wondering why Bug 46842 was closed with no resolution? The status shows as "Bogus".  However, I just bought a new laptop and installed MySQL 5.1.33, Apache 2.2.11, and PHP 5.2.9-1.  Then I couldn't run anymore because Apache dies with the exact same problem reported with Bug 46842.  In other words, it's not bogus at all.

I configured php.ini the same as I did on my old laptop (Apache 2.2.8, MySQL 5.0.22, PHP 5.2.5) by turning on CURL, MySQL, MySQLi, and OpenSSL.

By the way, I got by the problem by following the advice of one of the people who posted on Bug 46842 - I copied the libmysql.dll from PHP 5.2.5 and overwrote the one supplied by PHP 5.2.9, but I only did that because I can't afford down time.  I would gladly undo that change if someone would fix the problem.

Thanks,
Lonnie Jones

Reproduce code:
---------------
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql: '.mysql_error());
echo 'Connected successfully';

mysql_close($conn);
?> 


Expected result:
----------------
Connected successfully.

Actual result:
--------------
The browser says Apache can no longer function and will close.  Apache doesn't close, but I don't get a connection either.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-02 22:03 UTC] johannes@php.net
Your system loads libmysql.dll from 5.1 instead f the 5.0 version which was used when linking PHP but these libraries are incompatible. You can safely use the 5.0 dll to connect to a 5.1 serer though.
 [2009-04-03 13:48 UTC] ldjones at us dot ibm dot com
So, in other words, PHP 5.2.9 is simply not compatible with Apache 2.2.11?  I was using the files that came with both of those installations and it failed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC