[solved] XAMPP 1.70 & PHP PDO: "document contains no data."

Problems with the Windows version of XAMPP, questions, comments, and anything related.

[solved] XAMPP 1.70 & PHP PDO: "document contains no data."

Postby appel » 24. February 2009 23:58

First off, kudos for a great webdevelopment package. Been gratefully using it on a daily basis for years! However, I'm experiencing a weird problem with version 1.7.0, quite possibly a bug, and I was hoping somebody can enlighten me with a solution. Here's the deal. I recently had to reinstall Windows XP (SP3) and thus also installed the latest version of XAMPP (1.7.0). Everything went fine, most of my local sites work, except for some of them that use PHP's PDO extension. Firefox says:

Code: Select all
Page Load Error
The document contains no data.
The network link was interrupted while negotiating a connection. Please try again.

After some debugging I found that this code was apparently causing the error:

Code: Select all
$dbh->query("SELECT * FROM blog")

So, I tried some example PDO code (3 lines), pulled from PHP.net, which gave the exact same result. I then tried my original code on a Linux live server (hosted), also with PHP 5.2.8 and it did work! Then I went on to download XAMPP 1.6.8 (with PHP 5.2.6). To my surprise (or perhaps not :) ) the original code worked like a charm, again.

So, in the good spirit of elimination, I'm inclined to believe there's a bug in the Windows version of PHP 5.2.8 / PDO that's bundled with XAMPP 1.7.0.

Can anybody confirm this? Any insights? Thanks!
Last edited by appel on 25. February 2009 20:01, edited 1 time in total.
Posts: 2
Joined: 24. February 2009 23:36

Re: XAMPP 1.70 & PHP PDO: "The document contains no data."

Postby Izzy » 25. February 2009 04:23

Seems to be a bug issue.

These Google Results may help.

These Forum Search Results from several discussions and some fixes perhaps - open a result's topic to reveal more text and links.

This was one of the reported fixes with mixed results it seems, but some of the negative replies were perhaps related to issue other than the PDO bug.

Last edited by Izzy on 12. March 2009 10:38, edited 1 time in total.
Posts: 3344
Joined: 25. April 2006 17:06

Re: XAMPP 1.70 & PHP PDO: "The document contains no data."

Postby bassclarinet » 25. February 2009 09:51

This seems to be a mistake in the XAMPP distribution.

Look in both the apache\bin and php folders for the file libmysql.dll (or libmysql_*.dll, don't remember the exact name).

libmysql.dll is dated 17-dec-2008 19:48 and has 1646592 bytes.
Replace it by the file libmysql_*.dll dated 04-aug-2008 with 2068480 bytes.

If you don't have this file, download the PHP 5.2.8 binaries from php.net and extract this libmysql.dll.
After replacing the file, restart the server. Done.
Posts: 2
Joined: 25. February 2009 09:45

Re: XAMPP 1.70 & PHP PDO: "The document contains no data."

Postby appel » 25. February 2009 11:09

Thanks Izzy and bassclarinet for your kind responses and suggestions. I will look into it tonight (currently at work) and will post the results here.

Thanks again!


edit: I followed bassclarinet's steps and sure enough it's working now so thank you both for your help! Just wondering, shouldn't XAMPP 1.7.0 be updated?
Posts: 2
Joined: 24. February 2009 23:36

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests