Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

Something has gone wrong

Prepared statement needs to be re-prepared
select *
from GDN_User User
where UserID = :UserID
The error occurred on or near: /home/traders/public_html/library/database/class.database.php
422: if (!$message) {
423: $message = $ex->getMessage();
424: }
426: trigger_error($message, E_USER_ERROR);
427: }
429: }
[/home/traders/public_html/library/database/class.database.php:426] PHP::trigger_error();
[/home/traders/public_html/library/database/class.sqldriver.php:1663] Gdn_Database->query();
[/home/traders/public_html/library/database/class.sqldriver.php:884] Gdn_SQLDriver->query();
[/home/traders/public_html/library/core/class.model.php:556] Gdn_SQLDriver->getWhere();
[/home/traders/public_html/library/core/class.model.php:515] Gdn_Model->getWhere();
[/home/traders/public_html/applications/dashboard/models/class.usermodel.php:1383] Gdn_Model->getID();
[/home/traders/public_html/applications/dashboard/models/class.usermodel.php:1615] UserModel->getID();
[/home/traders/public_html/library/core/class.session.php:421] UserModel->getSession();
[/home/traders/public_html/library/core/class.auth.php:59] Gdn_Session->start();
[/home/traders/public_html/bootstrap.php:240] Gdn_Auth->startAuthenticator();
[/home/traders/public_html/index.php:32] PHP::require_once();
Variables in local scope:
[Sql] 'select *
from GDN_User User
where UserID = :UserID'
[InputParameters] array (
':UserID' => '2',
[Options] array (
'Type' => 'select',
'Slave' => NULL,
'ReturnType' => 'DataSet',
[ReturnType] 'DataSet'
[tries] 2
[try] 0
[PDO] array (
[PDOStatement] array (
'queryString' => 'select *
from GDN_User User
where UserID = :UserID',
[state] '00000'
[code] NULL
[message] 'Prepared statement needs to be re-prepared|Gdn_Database|Query|select *
from GDN_User User
where UserID = :UserID'
[ex] array (
Need Help?
If you are a user of this website, you can report this message to a website administrator.
If you are an administrator of this website, you can get help at the Vanilla Community Forums.
Additional information for support personnel:
Application: Vanilla
Application Version: 2.3.1
PHP Version: 7.1.8
Operating System: Linux
Server Software: LiteSpeed
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Request Uri: /
Controller: Gdn_Database
Method: Query


  • Could you try disabling all your plugins and using the base theme to see if the problem persists?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    It's a MySql problem. Google for "Prepared statement needs to be re-prepared" and try to find out what your problem is

  • LincLinc Director of Development Detroit Vanilla Staff

    I believe this is a hosting problem and you should file a ticket with your provider.

    This is throwing an error on the very first database query that triggers on a pageload. We don't use prepared statements in Vanilla, so my guess is that the host is doing some sort of automated work that is failing in the background, which is blocking your first query from running.

Sign In or Register to comment.