Re: PDO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 22, 2012 at 3:27 PM, Silvio Siefke <siefke_listen@xxxxxx> wrote:

> Hello,
>
> i have built php 5.4.7 on Ubuntu with the configure Arguments like on my
> Gentoo System. But on Gentoo run the website without Problems, under Ubuntu
> want not work. I become in error.log:
>
> [22-Oct-2012 21:15:00 UTC] PHP Fatal error:  Call to a member function
> prepare() on a non-object in html/index.html on line 23
>
> U use PHP FPM with Nginx.
>
> The configure Arguments:
> http://pastebin.geany.org/qz8TP/
>
> The Script which work:
> <?php
> require_once ("db.php");
>
> $query = $db->prepare("SELECT id, title, date FROM bloggen ORDER BY date
> DESC LIMIT 0,5");
> if (!$query) {die("Execute query error, because: " . $db->errorInfo());}
>

That looks like you've not connected to the database successfully inside of
db.php.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux