Bug in firebird driver

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Registered User
Posts: 1
Joined: Wed Apr 20, 2011 11:16 am

Bug in firebird driver

Post by farafonoff »

Can't register on your bug tracker, so i will post it here.

SQL ERROR [ firebird ]

Dynamic SQL Error SQL error code = -842 Precision must be from 1 to 18 [-842]


UPDATE phpbb_config SET config_value = CAST(CAST(config_value as DECIMAL(255, 0)) + 1 as VARCHAR(255)) WHERE config_name = 'num_posts'

while user registration.

* Set dynamic config value with arithmetic operation.
function set_config_count($config_name, $increment, $is_dynamic = false)
global $db, $cache;

switch ($db->sql_layer)
case 'firebird':
$sql_update = 'CAST(CAST(config_value as DECIMAL(18, 0)) + ' . (int) $increment . ' as VARCHAR(255))';

in file includes/functions.php
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC

Re: Bug in firebird driver

Post by Oleg »

Thanks for the report.

Which version of firebird and phpbb was this on?

I created a ticket: http://tracker.phpbb.com/browse/PHPBB3-10146
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

Return to “[3.0.x] Support Forum”