CodeIgniter Forums
Conflicting global variables - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Conflicting global variables (/showthread.php?tid=14276)



Conflicting global variables - El Forum - 12-26-2008

[eluser]ixxalnxxi[/eluser]
Hello All,

I am trying to do cross-site sessions with phpbb3 and my site so that the login is only performed once. However trying to accomplish this has been a headache. It seems when I am using working code inside of CI I get errors which I believe are due to same global variables. What can I do to avoid this?

I have read the forums here and at phpbb3 and there were others that brought up this problem but there was no solution.

Thanks.


Conflicting global variables - El Forum - 12-26-2008

[eluser]kRON[/eluser]
The quickest solution would be to do a full scope search and prefix all phpBB variables with 'phpBB_'. Search for words beginning with '$', [', [", ->. I haven't had a look at phpBB, but if you can crack down public variables and globals - all the better.

Additionally, you could also implement namespaces (cleanest solution) but that'd likely take too much time.


Conflicting global variables - El Forum - 12-26-2008

[eluser]ixxalnxxi[/eluser]
I was really hoping that it wouldn't come to renaming every variable.. but I am unfamiliar with namespaces (atleast in php) so I'll probably be changing the variables if I don't find out anything relatively soon.