How to fix "Fatal error: Cannot redeclare utf8..." errors

Support specific to the phpBB 3 plugin.
Forum rules
Please post all the bugs you encounter on our issue tracker.

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby Lady R on Fri Nov 18, 2011 10:26 pm

Hi, the same fix is to do into joomla/libraries/phputf8/utf8.php if the master is phpBB3 and the slave is Joomla ^.^
User avatar
Lady R
JFusion Newbie
JFusion Newbie
 
Posts: 5
Joined: Sun Jul 24, 2011 11:33 am

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby Sarr on Thu Dec 15, 2011 3:25 pm

Hi,

I made a standard installation of Joomla 1.7.3 plus Jfusion 1.6.
And I get this error when trying to dual login from forum (forum's on it's own subdomain) even with the file edited.
It's here: http://forum.ruszrock.pl
It worked for joomla 1.5.23 (forum.ddopl.com), but doesn't work for Joomla 1.7.3. So it's impossible to login via PhPBB forum (version 3.0.9).

Can anyone help with this problem?
It's hard to believe I'm the only one with having it... There's even nothing frameless, default config, just used newest JFusion and Joomla.
User avatar
Sarr
JFusion Newbie II
JFusion Newbie II
 
Posts: 15
Joined: Sat Aug 08, 2009 9:54 pm
Location: Poland, Warsaw

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby fanno on Thu Dec 15, 2011 3:37 pm

Sarr wrote:Hi,

I made a standard installation of Joomla 1.7.3 plus Jfusion 1.6.
And I get this error when trying to dual login from forum (forum's on it's own subdomain) even with the file edited.
It's here: http://forum.ruszrock.pl
It worked for joomla 1.5.23 (forum.ddopl.com), but doesn't work for Joomla 1.7.3. So it's impossible to login via PhPBB forum (version 3.0.9).

Can anyone help with this problem?
It's hard to believe I'm the only one with having it... There's even nothing frameless, default config, just used newest JFusion and Joomla.

I have started cleaning the forums to make it more easy to find use full info.. (not yet moved to out knowledge base)

I did remove a new to many tho.. But it this has been move to out knowledge base.

On the support section, and added as a download in our download section (Tho this was broken link till I fixed it earlier today)

Even this thread it self tells you what the problem is. And how to resolve it.

-Thanks
Fanno
_________________________________
Developer
Specialist on SMF, DokuWiki , Mantis, Eventum, Mediawiki, Universal plugin


Review us at!
http://extensions.joomla.org/extensions/3723/details
User avatar
fanno
Developer
Developer
 
Posts: 7666
Joined: Wed Jan 07, 2009 4:38 pm
Location: Denmark, Copenhagen

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby Sarr on Thu Dec 15, 2011 4:20 pm

Hmm, ok, sorry, I'll make it clearer. I've tried above files and they don't work on Joomla 1.7.3 and Jfusion 1.6.
So this solution worked for 1.5.23 with Jfusion 1.6, but not for newest Joomla. At least in my case, but it's 100% default config I guess.

UPDATE:
Yes, I can confirm: (http://)forum.ruszrock.pl
That's how it looks with the file from here: http://www.jfusion.org/downloads/phpbb/phpbb-3-0-9

So it's not working with your solution any longer.
Other idea that came to my mind is that maybe Ultimate SEO Mod is causing some conflict resulting in this error, but I don't think it's possible...
The mod is here: http://www.phpbb-seo.com/en/phpbb-mod-r ... t4608.html

(sorry for posting and deleting 3 times, but there's no edit option on these forums...)
User avatar
Sarr
JFusion Newbie II
JFusion Newbie II
 
Posts: 15
Joined: Sat Aug 08, 2009 9:54 pm
Location: Poland, Warsaw

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby Sarr on Thu Dec 15, 2011 4:51 pm

Ok, I've edited Joomla's core.php file (/public_html/libraries/phputf8/mbstring).
And now dual login works from joomla, I can log in and log out and phpbb reacts the same way.
But from phpbb I can't dual log in, nor dual log out.
User avatar
Sarr
JFusion Newbie II
JFusion Newbie II
 
Posts: 15
Joined: Sat Aug 08, 2009 9:54 pm
Location: Poland, Warsaw

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby fanno on Thu Dec 15, 2011 5:04 pm

support is not given here. create a ticket.
Fanno
_________________________________
Developer
Specialist on SMF, DokuWiki , Mantis, Eventum, Mediawiki, Universal plugin


Review us at!
http://extensions.joomla.org/extensions/3723/details
User avatar
fanno
Developer
Developer
 
Posts: 7666
Joined: Wed Jan 07, 2009 4:38 pm
Location: Denmark, Copenhagen

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby Sarr on Thu Dec 15, 2011 5:11 pm

UPDATE: Ok, it's working. I just needed to clear all cookies for the domain and subdomain.

Here what is needed to do for configuration:
Joomla 1.7.3 + PhPBB3 + Jfusion 1.6 (with dual login).
1. Copy this file to [your phpbb3 folder name]/includes/utf (replacing old one):
http://www.jfusion.org/docs/doku.php/id ... redeclare/

2. Remove ".txt" from extension and copy this file I made (for Joomla 1.7.3) here:
[root joomla folder]/libraries/phputf8/mbstring - replace old file.
core.php.txt
(4.4 KiB) Downloaded 237 times

Now dual login should work fine after you clear cookies.
User avatar
Sarr
JFusion Newbie II
JFusion Newbie II
 
Posts: 15
Joined: Sat Aug 08, 2009 9:54 pm
Location: Poland, Warsaw

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby manni on Tue Dec 27, 2011 5:58 pm

Hi all,

i have installed joomla 1.7 and phpbb3.09
now i will make the bridge, but have a problem!

what i have to do when i will have only the phpbb3 register and login System??
when i will take the auto config there give me an Error
"Dual-login may work with the following cookie path is best /"- whats that??

many thanx
User avatar
manni
JFusion Newbie
JFusion Newbie
 
Posts: 2
Joined: Tue Dec 27, 2011 4:32 pm

Re: How to fix "Fatal error: Cannot redeclare utf8..." errors

Postby manni on Tue Dec 27, 2011 6:40 pm

other oner when i check the login
Fatal error: Cannot redeclare utf8_strrpos() (previously declared in C:\xampp\htdocs\joomla\libraries\phputf8\mbstring\core.php:69) in C:\xampp\htdocs\joomla\forum\includes\utf\utf_tools.php on line 122

:shock:
User avatar
manni
JFusion Newbie
JFusion Newbie
 
Posts: 2
Joined: Tue Dec 27, 2011 4:32 pm

Re: How to fix "Fatal error: Cannot redeclare utf8..." error

Postby fade2gray on Fri Jan 06, 2012 3:52 am

Here's a simple php script for fixing "Cannot redeclare utf8_xxx" errors. Works for current Joomla 1.7.x/2.5.x and phpBB 3.0.10 releases.

NOTE: This script is intended to be applied to previously unedited (clean) core.php and utf8_tools.php files.

Just upload a copy to the root of your Joomla and phpBB3 installation directories (renaming the script to redeclare_fix.php) then run:

your_domain.com/your_Joomla_dir/redeclare_fix.php
and
your_domain.com/your_phpBB3_dir/redeclare_fix.php

Backups of the original files will be created before wrapping all the utf8 functions in conditional statements (also, the correct indentation will be applied accordingly). Appropriate messages will be displayed if any errors are encountered.
Attachments
redeclare_fix.php.txt
(3.24 KiB) Downloaded 1274 times
Last edited by fade2gray on Thu May 17, 2012 4:17 am, edited 4 times in total.
I don't code - I just butcher that of others.
User avatar
fade2gray
JFusion Intermediate
JFusion Intermediate
 
Posts: 75
Joined: Thu Aug 06, 2009 12:48 pm

PreviousNext

Return to phpBB 3

Who is online

Users browsing this forum: No registered users and 2 guests