Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5098

Re: php PDO does not work

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Date Sat, 03 Mar 2012 16:34:25 +0100
From Luuk <luuk@invalid.lan>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version 1.0
Newsgroups comp.lang.php
Subject Re: php PDO does not work
References <427252.950.1330787450521.JavaMail.geo-discussion-forums@pbcwi5>
In-Reply-To <427252.950.1330787450521.JavaMail.geo-discussion-forums@pbcwi5>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Message-ID <l8q929-ti2.ln1@luuk.invalid.lan> (permalink)
Lines 27
NNTP-Posting-Host 2001:980:9089:1:a1b9:8817:e871:7875
X-Trace 1330788901 news.xs4all.nl 6941 [2001:980:9089:1:a1b9:8817:e871:7875]:44293
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.php:5098

Show key headers only | View raw


On 03-03-2012 16:10, test japan wrote:
> i installed php and mysql on archlinux 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) {

change above line to:
} catch (PDOException $ex) {


>         echo $ex->getMessage();
>    
> 
> anyone can help me?
> thanks!

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

php PDO does not work test japan <testatjapan@gmail.com> - 2012-03-03 07:10 -0800
  Re: php PDO does not work Luuk <luuk@invalid.lan> - 2012-03-03 16:34 +0100
  Re: php PDO does not work Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-03 12:59 -0500
    Re: php PDO does not work test japan <testatjapan@gmail.com> - 2012-03-03 17:08 -0800
  Re: php PDO does not work "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-03-05 10:23 +0100
    Re: php PDO does not work Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-05 08:04 -0500

csiph-web