Page 1 of 1

how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 11:07 am
by Echo Dino
hello!

my root is /forum. i wanted to use phpbb data on the page out of root folder.

http://hewan.altervista.org

and i did these codes into this:

Code: Select all

<?php
define('IN_PHPBB', true);
//$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include('forum/common.php');

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('Home');

$template->set_filenames(array(
   'body' => 'mainhome.html', 
));

make_jumpbox(append_sid("forum/viewforum.php"));
page_footer();
?>
but that give me this?

Code: Select all

Fatal error: Composer dependencies have not been set up yet, run 'php ../composer.phar install' from the phpBB directory to do so. in /membri/hewan/forum/includes/startup.php on line 80

Re: how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 11:40 am
by david63
That error is usually because you either have a missing or corrupt vendor folder.

Re: how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 12:31 pm
by Echo Dino
david63 wrote:
Fri Jun 28, 2019 11:40 am
That error is usually because you either have a missing or corrupt vendor folder.
No it's not. Files in root folder are working

Re: how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 12:46 pm
by david63
Echo Dino wrote:
Fri Jun 28, 2019 12:31 pm
No it's not. Files in root folder are working
Yes it is because of this line//$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

Re: how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 1:28 pm
by Brf
I would guess because you have not defined PHPBB_ROOT_PATH.
That should point to your phpbb install. From your include statement, I would guess it should be defined as 'forum/'
Then put back in the line mentioned above.

Re: how can i use file based on phpbb out of root folder?

Posted: Fri Jun 28, 2019 2:09 pm
by Echo Dino
Brf wrote:
Fri Jun 28, 2019 1:28 pm
I would guess because you have not defined PHPBB_ROOT_PATH.
That should point to your phpbb install. From your include statement, I would guess it should be defined as 'forum/'
Then put back in the line mentioned above.
WORKED! thank you :D