Page 1 of 1

Fatal error dbal.php when attempting to update

Posted: Tue Dec 24, 2013 12:49 pm
by jam_rs
Support Request Template
What version of phpBB are you using? phpBB 3.0.9
What is your board's URL? http://www.fiestamk7.com
Who do you host your board with? hostgator
How did you install your board? I used a tool provided by my host
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? No
Do you have any MODs installed? Yes
What version of phpBB3 did you update from? phpBB 3.0.11
What MODs do you have installed? ACP Add User MOD
Activity Stats MOD
Admin Easy User Delete
BB Garage 3.0.1
Google +1 MOD
Guests Past 24 hours on index
Latest Topic Title
ReIMG Image Resizer
Sitemap FX
SmiX.MODs Feed News Center
Tapatalk
Thanks for posts
Topic Preview
Topics descriptions
User Mention MOD
View your topics
phpBB SEO Dynamic Meta tags
phpBB SEO Optimal titles
phpBB SEO Related Topics
What styles do you currently have installed? standard
What language(s) is your board currently using? english
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP but not phpBB
When did your problem begin? Attempting to update from 3.0.9 to 3.0.12
Please describe your problem. On attempting to update, get this error: Fatal error: in /home1/jcooke/public_html/fiestamk7.com/includes/db/dbal.php on line 704
Generated by SRT Generator

Board appears to function Ok after i deleted the install directory, to regain access, all appears ok before this too.

Edit -
On searching, i found a similar issue, viewtopic.php?t=2111106
So tried this, added the code

Code: Select all

die($msg_long_text);
Now when updating get this error:


Updating database to latest stable release

Database type :: mysql4
Previous version :: 3.0.9
Updated version :: 3.0.12


Updating database schema

Progress :: Done
Result :: No errors


Updating data

Progress :: . . . SQL ERROR [ mysql4 ]

Table 'jcooke_phbb3.GARAGE_VEHICLES_TABLE' doesn't exist [1146]

SQL

SELECT v.id, v.made_year, mk.make, md.model FROM (GARAGE_VEHICLES_TABLE v, GARAGE_MAKES_TABLE mk, GARAGE_MODELS_TABLE md) WHERE v.user_id = 31 AND v.make_id = mk.id AND v.model_id = md.id GROUP BY v.id ORDER BY v.id

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/mods/class_garage_vehicle.php
LINE: 2041
CALL: dbal_mysql->sql_query()

FILE: includes/mods/class_garage_vehicle.php
LINE: 1090
CALL: garage_vehicle->get_vehicles_by_user()

FILE: includes/functions_user.php
LINE: 607
CALL: garage_vehicle->delete_user_vehicles()

FILE: install/database_update.php
LINE: 2181
CALL: user_delete()

FILE: install/database_update.php
LINE: 412
CALL: change_database_data()


The table does exist...

Re: Fatal error dbal.php when attempting to update

Posted: Tue Dec 24, 2013 3:22 pm
by T0ny
The garage MOD that you have installed stores its constants in includes/mods/constants_garage.php instead of includes/constants.php. This makes it incompatible with the database_update.php script.

Until such time as the author fixes this, you may be able to work around the problem by editing database_update.php and adding the lines

Code: Select all

if (!defined('GARAGE_VEHICLES_TABLE'))
{
	include($phpbb_root_path . 'includes/mods/constants_garage.' . $phpEx);
}
immediately before each of the two occurrences of

Code: Select all

include($phpbb_root_path . 'includes/functions_user.' . $phpEx);

Re: Fatal error dbal.php when attempting to update

Posted: Tue Dec 24, 2013 3:25 pm
by jam_rs
Many thanks, i will have a go at this soon, i understand what it going on now!

Will let you know how i get on.

Re: Fatal error dbal.php when attempting to update

Posted: Mon Jan 06, 2014 10:47 pm
by jam_rs
Finally on this, just a bit of help please.

Code: Select all

				if (!function_exists('user_add'))
				{
					include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
				}
Above is the section of original code, How exactly do i want this too look?

Re: Fatal error dbal.php when attempting to update

Posted: Mon Jan 06, 2014 11:50 pm
by Brf
Follow T0ny's directions and add that code to the database_update.php

Re: Fatal error dbal.php when attempting to update

Posted: Fri Jan 29, 2016 6:17 pm
by FlipTheDev
Hello All,
Yes, I know this is an old thread, but I'm posting this for those of you that might be having a little trouble doing this.... aka "NEWBIES"
Thank you

I used this method above by Tony and it worked perfectly.

I just added this...

Code: Select all

if (!defined('GARAGE_VEHICLES_TABLE'))
{
  include($phpbb_root_path . 'includes/mods/constants_garage.' . $phpEx);
}
just above this code....

Code: Select all

if (!function_exists('user_add'))
 {
 include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
 }
don't forget to put the spaces in between the two codes. It should look like this...

Code: Select all

if (!defined('GARAGE_VEHICLES_TABLE'))
 {
 include($phpbb_root_path . 'includes/mods/constants_garage.' . $phpEx);
 }

if (!function_exists('user_add'))
 {
 include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
 }
Note: I also had to update config.php file.

I enabled 'DEBUG' and 'DEBUG_EXTRA' in the root/config.php file.

To enable debug mode
Open config.php
And add this code to the botton just before ?> symbols.

Code: Select all

@define('DEBUG', true);
@define('DEBUG_EXTRA', true);
Replacing this code....if it is even there, if is not there just disregard this code.

Code: Select all

// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
I hope this helped the newbies that are looking for a fix!

Re: Fatal error dbal.php when attempting to update

Posted: Sat Feb 06, 2016 6:45 pm
by FlipTheDev
Hello you all!

Well, since my last post here, I have upgraded my board to the phpBB 3.1.6 version.

My question is: How do I revert this process, since I upgraded to 3.1.6, and now I want to totally remove the mod because it isn't compatible at all. The developer has abandoned the mod and now it useless.

The problem is: This mod has been conflicting with my current version.

How do I revert this process?

What I'm trying to do to remove the mod, but it isn't working because of these instructions in this thread that I am posting in, right now.

This is what I did! To try to remove the old mod that is in my database.

I followed the instructions in the link above and this is what comes up when I did it.
Image

What do you all think the problem is?

Thanks
Flip