473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PDO and ODBC results in "Error in my_thread_global_end(): 5 threads didn't exit"

Web Server: IIS6
PHP Version: 5.2.5
Database: MS SQLEXPRESS 2005
Loaded PDO Drivers: MSSQL, MySQL, ODBC

When executing the following script ($dbName, $username, $pw, $myDSN have been changed in this post to prevent access to my test environment):

<?php
try {
$dbname = "dbName";
$username = "MACHINENAME\\IUSR_JCOMP";
$pw = "";
$myDSN = "msTestDSN";
$dbh = new PDO("odbc:dsn=$myDSN;uid=$username;pwd=$pw");
} catch (PDOException $e) {
echo "Failed to get DB handle: " . $e->getMessage() . "\n";
exit;
}

$query = "select * from d_users";
foreach ($dbh->query($query) as $row) {
print $row['fname'] . "|" . $row['lname'] . "<br />";
}

$dbh = null;
?>

I receive the following result:

John|Smith
Bill|Jones
Error in my_thread_global_end(): 5 threads didn't exit

The first name/last name data pairs displayed are correct; however, nothing I do eliminates the error. I have disabled persistent connections eventhough according to the comments they are disabled by default on IIS. This message only occurs when I make a database connection. I don't get it by executing a non-database interactive page.

Has anybody seen this before? Can anybody help get rid of this error?
Feb 21 '08 #1
1 2393
pbmods
5,821 Expert 4TB
Heya, Roger.

This was a known bug in version 5.2.2. The solution was to copy the MySQL .dll file from the 5.2.1 distro to your 5.2.2 installation.

I don't know if/how this affects 5.2.5.

According to a post on the MySQL forum:
Ok what you have to do is this, go to your PHP install directory and rename libmysql.dll to libmysql.old.

Next head to http://www.php.net/releases/ and grab 5.2.1 Windows Binary download, just open the zip. Once open copy libmysql.dll to your php directory.

That should do the trick, it just worked fine for me.
Jun 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Paul Steele | last post by:
I often use the following code to check if a program is already running: if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1) ... This works find on all of my...
1
by: Dgates | last post by:
This request might belong in a "SQL"-related newsgroup, but it's such a pain using Agent to subscribe to a new group (and download its 50,000 messages!) just to ask one question. So, since it...
1
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer XP Pro/IIS 5.1. Everything worked fine prior to installing...
7
by: Mathew Butler | last post by:
I'm investigating an issue I have when pulling data back from MS access I'm retrieving all rows from a column in a table of 5000 rows - accessing a column of type "memo" ( can be 65353 character...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
23
by: deathtospam | last post by:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using Visual Studio .NET 2005 -- it worked, I saved it and closed the project. Today, I came back to the project, reopened the...
2
by: Ben | last post by:
Hi! It has been weeks now that I have been trying to fix an error that I encounter everytime it gets to the code at runtime: SQLStmt = "SELECT Sum() As TotalInStock, Sum( * ) AS TotalCost " & _...
3
by: DontB3 | last post by:
Hi, I'm new in this forum, and i hope someone can help. I'm creating an automatic application that transfer a database from Access -> DBF -> Oracle. When My App try to execute Insert SQL...
1
by: dryajov | last post by:
Hi I'm not sure if this should go here in the first place, this is more likely an ODBC driver issue. I'm having the strangest behavior when trying to do an insert into an access database from a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.