Fatal error: Call to undefined method

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Fatal error: Call to undefined method

Post by trees »

Hi!

I just updated my old forum to Phpbb 3.1.5 and now I can no longer access the ACP. I get the following error:

Fatal error: Call to undefined method phpbb\template\twig\twig::set_custom_template() in /home1/reporter/public_html/pirkkalafoorumi.com/adm/index.php on line 54

The only files I saved from the old install were:
config.php
store-folder
images-folder
files-folder

I ran modission_reset.php but it returned zero results.

How can I fix this?
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fatal error: Call to undefined method

Post by Lumpy Burgertushie »

delete everything from the cache folder except for the index and htaccess files.

did you run the database_update.php file ?

check to make sure that all files were uploaded.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Re: Fatal error: Call to undefined method

Post by trees »

I deleted the cache files, but still the same error.

I re-uploaded all the Phpbb3-folder files (except config.php, files-folder, store-folder and images-folder).

I ran the database_update a couple of more times. Still the same error.

Maybe my mistake was that I didn't delete the old files from the server, I simply replaced them with the Phpbb 3.1.5 files. I will now try to delete all the files from the server (except config.php, files-folder, store-folder and images-folder) and try again.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fatal error: Call to undefined method

Post by Lumpy Burgertushie »

yes, that is what the installation instructions tell you to do.

there are some 3.0 files that are not in 3.1 and there are some 3.1 files that are not in 3.0 etc.

even the ones with the same name are not the same files etc.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Re: Fatal error: Call to undefined method

Post by trees »

Damn still no luck.. same error even after deleting all the old files and only then installing the new files.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fatal error: Call to undefined method

Post by Lumpy Burgertushie »

what php version are you running on the host server?


roberrt
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Re: Fatal error: Call to undefined method

Post by trees »

Thanks for your support!

My Php version is 5.4.

After doing another "clean" install, I'm now getting the following error when trying to access ACP:

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (@<UNIX_TIMESTAMP>) at position 0 (@): Unexpected character' in /home1/reporter/public_html/pirkkalafoorumi.com/phpbb/datetime.php:50 Stack trace: #0 /home1/reporter/public_html/pirkkalafoorumi.com/phpbb/datetime.php(50): DateTime->__construct('@<UNIX_TIMESTAM...', Object(DateTimeZone)) #1 /home1/reporter/public_html/pirkkalafoorumi.com/phpbb/user.php(720): phpbb\datetime->__construct(Object(phpbb\user), '@<UNIX_TIMESTAM...', Object(DateTimeZone)) #2 /home1/reporter/public_html/pirkkalafoorumi.com/includes/acp/acp_main.php(462): phpbb\user->format_date('<UNIX_TIMESTAMP...') #3 /home1/reporter/public_html/pirkkalafoorumi.com/includes/functions_module.php(674): acp_main->main('main', 'main') #4 /home1/reporter/public_html/pirkkalafoorumi.com/adm/index.php(81): p_master->load_active() #5 {main} thrown in /home1/reporter/public_html/pirkkalafoorumi.com/phpbb/datetime.php on line 50
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Fatal error: Call to undefined method

Post by Lumpy Burgertushie »

clear the cache again. make sure you have the current version of any languages that you have installed.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Re: Fatal error: Call to undefined method

Post by trees »

Cleared the cache again (except the index file and .htaccess) and made sure the Finnish language pack is for 3.1.5.

Still getting the same DateTime error :/ Everything else seems to be working, I just can't access ACP.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10551
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Fatal error: Call to undefined method

Post by Noxwizard »

Your board start date has junk in it. Go here and enter a date on the right that you would like to use as your board's start date and get the unix timestamp: http://www.unixtimestamp.com/

Then use the number in this query and run it:

Code: Select all

UPDATE phpbb_config SET config_value = 'TIMESTAMP_HERE' WHERE config_name = 'board_startdate'
Replace TIMESTAMP_HERE with the value you obtained from the other site. Then delete /cache/data_global.php.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
trees
Registered User
Posts: 14
Joined: Fri Jan 02, 2015 8:28 pm

Re: Fatal error: Call to undefined method

Post by trees »

The query was successful. First it didn't seem to work, but after cleaning the cache once again and switching to a different browser just to be sure, it's finally working! Thank you very much for both of you for your kind support!
Locked

Return to “[3.1.x] Support Forum”