I was trying to integrate opencart and phpbb but got into issues By integration I mean, when user logs into opencart or phpbb they get logged onto both the sites(which worked fine for me since it only involved inserting the relevant data in opencart DB at time of login into phpbb and vice versa)
The issue happened when I have to start getting phpbb posts in the opencart page itself I followed this thread
wiki.phpbb.com/Practical.Displaying_posts_and_topics_on_external_pages
Eventually following line includes almost all the classes/functions in phpbb
include($phpbb_root_path . 'common.' . $phpEx);
Now, there are clases with same name in both(for instance Cache, Session, Template) I renamed all the conflicting classes in PHP to proceed but found out that there are global variables with same name. Even the global variables like $db had same names For common functions also, I just have to delete duplicate functions carefully
Can someone tell me what is the way to integrate two php applications which have common class names, functions and global variables
I was thinking if nothing else works, I would access phpbb from opencart as ajax request/response so that phpbb is still a different application. For instance, issue an ajax request to get the posts (by passing topic id to say http url/forum and read the response I get from the script) and write this response in the opencart screen