fanno / org.jfusion.phpbb31

development repo for phpbb 3.1.x plugin.
1 stars 0 forks source link

Fatal error: Call to a member function header() #4

Closed electro143 closed 9 years ago

electro143 commented 10 years ago

Hi,i've tried to add if (!function_exists('the_actual_function_name')) { then } for closing the function but i can't seem to have it working after im past the fonction ''strlen'' on line 583 then it indicate me an error on line 223:

Fatal error: Call to a member function header() on a non-object in /_/_/public_html/forum/phpbb/session.php on line 223

Here it is what on line 223:

if (!function_exists('utf8_strlen')) { function utf8_strlen($text) { // Since utf8_decode is replacing multibyte characters to ? strlen works fine return strlen(utf8_decode($text)); } } }

I will upload my last text file as an attachment... utf_toolsjfusionboard.txt the file with the modifications ive done (62.08 KiB) Not downloaded yet

For info im using joomla 3.3 and phpbb 3.1 .Seem to work great in wrapper but it dont work in frameless (need frameless).Hope someone wil give me some help...Thank!

fanno commented 10 years ago

$this->browser = $request->header('User-Agent');

this is my line 223 it has nothing to do with the function_exists

electro143 commented 10 years ago

May you have a look at the file I submitted on your forum then and tell me what I did wrong? Im not a programmer i just have some basic in java

electro143 commented 10 years ago

I Forgot to thank you for your help ...Thank for your nice bridge it is really awesome :-) ...

fanno commented 10 years ago

https://github.com/fanno/org.jfusion.phpbb31/commit/52b0e962f77f16bd1e3f5742d52efc0f11a96efc

electro143 commented 10 years ago

oops...Did i forgot to mention that the file ive modified was utf_tools.php ? Sorry

fanno commented 10 years ago

the error: Fatal error: Call to a member function header() on a non-object in /_/_/public_html/forum/phpbb/session.php on line 223

has nothing to do with utf_tools.php and "class/function" redeclare.

electro143 commented 10 years ago

Ok i will try to modify the file public.php...Thank for your help...

electro143 commented 10 years ago

Modified it...now it give me that error : Fatal error: Call to a member function getScriptName() on a non-object in /_/_/public_html/forum/phpbb/session.php on line 45

fanno commented 10 years ago

added new commit, please update

electro143 commented 10 years ago

Updated it with new commit...gave that error:

Fatal error: Call to a member function triggerevent() on a non-object in /***/*_/public_html/forum/phpbb/user.php on line 184

fanno commented 10 years ago

one more "same" issue

electro143 commented 10 years ago

Could you explain what you mean?

electro143 commented 10 years ago

OK i think I know waht you mean...it seem to be calling an non object each time

fanno commented 10 years ago

yes because is is trying to access a global object that are not defined. i have created yet another commit fui

electro143 commented 10 years ago

Ok ill give it a try when you will send it

electro143 commented 10 years ago

thank for your help so far...really appreciated :-)

fanno commented 10 years ago

i already did

electro143 commented 10 years ago

What you change?public.php?

fanno commented 10 years ago

i added more globals, just checkout latest version and update all the files or just the one would propearly be more easy =)

electro143 commented 10 years ago

Ok ive paste the new public.php it gave me that error : Erreur générale Illegal use of $_SERVER. You must use the request class or requestvar() to access input data. Found in /***/*_/public_html/components/com_jfusion/plugins/phpbb31/public.php on line 305. This error message was generated by deactivated_super_global.

electro143 commented 10 years ago

I need to go right now...I will come back later...Thank.

fanno commented 10 years ago

i don't see a $_SERVER on like 305 so i do not know what i need to look for.

electro143 commented 10 years ago

Yes there is one that on line 305 : $_SERVER['PHP_SELF'] = $php_self;

electro143 commented 10 years ago

Dont know why when I copy you code its line 305 but here in github it is line 337

fanno commented 10 years ago

Get a copy of the whole file so everything matches up

$_SERVER['PHP_SELF'] = $php_self; is on my line 337

Not sure how this can can be bypassed. i am not sure but if nothing can be done about this then frameless integration with phpbb is dead. i think.

assuming that $_SERVER['PHP_SELF'] still get's changed. and we need to reset it.

so this point in time it is not looking good.

fanno commented 10 years ago

may or may not have a way around this...

I wont make a commit as i don't want to mess up change log to much.

please try this.

find: //restore $_SERVER['PHP_SELF'] $_SERVER['PHP_SELF'] = $php_self;

change to: if ($request) { $request->enable_super_globals(); } //restore $_SERVER['PHP_SELF'] $_SERVER['PHP_SELF'] = $php_self;

if it works i will add it.

electro143 commented 10 years ago

I think you are on the way cause now I have the error but it is appearing inside a frameless inside my template :-) ...Here the error :

Erreur générale Illegal use of $_GET. You must use the request class or requestvar() to access input data. Found in /***/*_/public_html/components/com_jfusion/plugins/phpbb31/hooks.php on line 159. This error message was generated by deactivated_super_global.

fanno commented 10 years ago

looks like the hooks.php need to be re written in few location's, i'ts a not simple so i may have to push this to the weekend so i can do it in one session to save time. and be more efficient.

-Thanks

fanno commented 9 years ago

new version committed of the hooks.php

unfortunatly it looks like this change could warrent a totally new version of the phpbb plugin. or at the very least two different version's of the hooks.php

electro143 commented 9 years ago

It is now indicate that error : Fatal error: Call to a member function get_web_rootpath() on a non-object in /***/*_/public_html/forum/includes/functions_content.php on line 894

fanno commented 9 years ago

Was yet another global that was missing.

Once again thanks for helping.

electro143 commented 9 years ago

No problem ill help you until it work :-)...Tried the new global here the new error:

Illegal use of $_SERVER. You must use the request class or requestvar() to access input data. Found in /***/*_/public_html/components/com_jfusion/plugins/phpbb31/public.php on line 306. This error message was generated by deactivated_super_global.

fanno commented 9 years ago

hmm the: $request->enable_super_globals();

Is missing i was sure i added it but i guess not.

also i don't understand the line numbers still do not match up please update the whole file public.php

electro143 commented 9 years ago

Yep ive downloaded the public.php and now it seem to work...But there is some thing that not working...with my template...Do I have to use a template for it to work?Ive sent you the link to my website on your personal mail...

fanno commented 9 years ago

I finaly got around to looking at testing out the forum my self.

I your phpbb instaled in a subfolder ? or ?

electro143 commented 9 years ago

Tes my forum si installed in a "forum" subfolder named forum...Joomla ans phpbb dis mot share the dame database tought...

fanno commented 9 years ago

hmm ok on my end there is problem with frameless, it seems the url's are acting different from old phpbb.

electro143 commented 9 years ago

Hum...the only problem I have with frameless right now is When im connect in phpbb I get out of the frame and go on the forum page (out of the joomla frame)...

I have other problems: -When im connecting in joomla it doesnt connect to phpbb -The last topic/Last post module not working

Maye it is somewhat of my configuration not done right thought... :-/

fanno commented 9 years ago

send link again plz

electro143 commented 9 years ago

Link sent on your mail

electro143 commented 9 years ago

Other error : when I try to login in my administrator control panel on phpbb it return me to my main page and when im trying to acces my moderator control panel it give me that error :Fatal error: Call to a member function get_finder() on a non-object in /home/quebec8/public_html/forum/includes/functions_module.php on line 1053

electro143 commented 9 years ago

When I try to put the joomla config in "dual login" ive got this error when trying to connect Fatal error: Call to a member function header() on a non-object in /home/quebec8/public_html/forum/phpbb/session.php on line 223

electro143 commented 9 years ago

Ok ive tweaked my parameter and now it seem to work for dual login...My main problem is the error on line 1053 as stated earlier...The error seem to appear when i try to login in my moderatoror control panel ,and when i try to modify my profile in phpbb...

fanno commented 9 years ago

this issue is getting to long for me to remember everything so since this might be different issue please create a different issue.