Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Fatal Error in PHP.gdn_ErrorHandler();

Hello.

I am having some issues with the roles and permission section in the dashboard.

I am using Vanilla 2.5.1 from a clean install. I did change the database prefix in the config file (to avoid conflict with a previous version I had installed on the same server).

I then used the Porter addon to export/import my posts/users/roles/etc to the new installation. Everything works just great, with one exeption: I am not able to edit permissions for the user groups and I am not able to add new roles. What I get is the dreaded "Something went wrong" page.

I would really appreciate some help on this one...

I enabled debugging and this is what I get:

Fatal Error in PHP.gdn_ErrorHandler();

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' p.Name as Name from v2018_c c left join v2018_p p on c. = p.ID' at line 1

The error occurred on or near: /customers/5/4/a/pmono.no/httpd.www/2018forum/library/database/class.database.php

403: // If we get here then the pdo statement prepared properly.
404: break;
405:
406: } catch (Gdn_UserException $uex) {
407: trigger_error($uex->getMessage(), E_USER_ERROR);
408: } catch (Exception $ex) {
409: list($state, $code, $message) = $pDO->errorInfo();
410:
411: // If the error code is consistent with a disconnect, attempt to retry

Backtrace:
/customers/5/4/a/pmono.no/httpd.www/2018forum/library/database/class.database.phpPHP::gdn_ErrorHandler();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/library/database/class.database.php:407] PHP::trigger_error();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/library/database/class.sqldriver.php:1684] Gdn_Database->query();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/library/database/class.sqldriver.php:629] Gdn_SQLDriver->query();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/applications/dashboard/models/class.permissionmodel.php:595] Gdn_SQLDriver->get();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/applications/dashboard/models/class.permissionmodel.php:731] PermissionModel->getJunctionPermissions();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/applications/dashboard/models/class.permissionmodel.php:781] PermissionModel->getPermissions();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/applications/dashboard/controllers/class.rolecontroller.php:153] PermissionModel->getPermissionsEdit();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/library/core/class.dispatcher.php:833] RoleController->edit();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/library/core/class.dispatcher.php:262] Gdn_Dispatcher->dispatchController();
[/customers/5/4/a/pmono.no/httpd.www/2018forum/index.php:29] Gdn_Dispatcher->dispatch();

Variables in local scope:
[sql] 'select distinct p.ID as ID, c., p.Name as Name
from v2018_c c
left join v2018_p p on c. = p.ID'
[inputParameters] array (
)
[options] array (
'Type' => 'select',
'Slave' => NULL,
'ReturnType' => 'DataSet',
)
[returnType] 'DataSet'
[tries] 2
[try] 0
[pDO] array (
)
[pDOStatement] false
[state] '42000'
[code] 1064
[message] 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \' p.Name as Name
from v2018_c c
left join v2018_p p on c. = p.ID\' at line 1'
[uex] array (
)

Comments

  • whu606whu606 MVP
    edited February 2018

    Porter is NOT intended for Vanilla upgrades.

    Please follow the documented upgrade path.

    If you want to use an existing Vanilla DB on a clean install, simply change the DB details in config.php, delete the ini files from cache and then go to yourforum.com/utility/update to force any updates needed.

Sign In or Register to comment.