You are not logged in.
i installed php and mysql by pacman,
and in phpinfo page, i can see the infomation about mysql & pdo_mysql
in php.ini, i uncommented the following lines:
extension=mysqli.so
extension=mysql.so
extension=pdo_mysql.so
but when running the code below, the browser shows a blank page
no result, even no error message.
try {
$dbh = new PDO("mysql:host=192.168.0.1;dbname=testdb", "username", "password");
echo 'Connected to database!!';
} catch (PDOException ex) {
echo $ex->getMessage();
anyone can help me?
thanks!
Last edited by testAtJapan (2012-03-04 01:16:23)
Offline
solved this problem by the other forum's guys.
i misspell the
PDOException ex
it should be
PDOException $ex
and modified the php.ini like below, the page will show the error Messages.
error_reporting = E_ALL
display_errors = On
Offline