Hello everybody,
I am running MySQL client version: 5.1.30 which has been bundled with
Xampp version 1.7.
This is the web server etc details under Xampp installation
* Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i
mod_autoindex_color
PHP/5.2.8
* MySQL client version: 5.1.30
* PHP extension: mysql
The tables are of type InnoDB. And I am using PDO.
I have a query "select * from tablename" which runs fine under
phpmyadmin . It fails in
my php code. The error says "Apache needs to close, send error report".
In reality Apache doesn't close .
Also the same query "select Username from tablename" goes through as
expected. Here Username is a column name. The problem arises only when I
use PDO not otherwise.
Reproduce code:
---------------
$dbLink = $database->connectToDb();
if($dbLink instanceof PDO)
{
strStatement="SELECT * FROM user_login WHERE `Password`
='$encryptOldPwd'";
$result=$dbLink->query($strStatement)->fetch() ;
echo ($result[0]->UserName);
}
Expected result:
----------------
I expect to see the Username on the browser.
Actual result:
--------------
The browser shows a dialog box with error says "Apache needs to close,
send error report".
In reality Apache doesn't close .
When I click Do not send error , dialog box goes away and browser is
blank.
Thanks
Sucheta