The (well) formatted text: Hi all! I'm trying to use phpBB3 (forum app) along with ZF2. For that, I have to include a file from the phpBB3. In theory this is as simple as:
include('/path/to/phpbb3/common.php'); $user->session_begin(); //$user is defined in common.php file In common.php a lot of globals are defined, and after that are required some files which are using those globals. In ZF2 simply including the common.php would not work, because the scope of the globals will not span over the required files, so I tried a little trick: //in Application/Forum/Service public function callForumAPI(){ $zf_dir = getcwd(); chdir('/var/www/html/phpBB3'); include('common.php'); $user->session_begin(); chdir($zf_dir); } Neither in this case the scope of the global variables didn't span over the required files, so all the globals where NULL in those files. How could I solve this issue? Thank you! -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Including-an-external-application-in-ZF2-tp4661341p4661342.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com