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

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
User avatar
Echo Dino
Registered User
Posts: 37
Joined: Fri Mar 22, 2019 11:09 am
Name: Saba
Contact:

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

Post by Echo Dino » Fri Jun 28, 2019 11:07 am

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

User avatar
david63
Registered User
Posts: 16669
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Fri Jun 28, 2019 11:40 am

That error is usually because you either have a missing or corrupt vendor folder.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Echo Dino
Registered User
Posts: 37
Joined: Fri Mar 22, 2019 11:09 am
Name: Saba
Contact:

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

Post by Echo Dino » Fri Jun 28, 2019 12:31 pm

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

User avatar
david63
Registered User
Posts: 16669
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Fri Jun 28, 2019 12:46 pm

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 : './';
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

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

Post by Brf » 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.

User avatar
Echo Dino
Registered User
Posts: 37
Joined: Fri Mar 22, 2019 11:09 am
Name: Saba
Contact:

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

Post by Echo Dino » Fri Jun 28, 2019 2:09 pm

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

Post Reply

Return to “phpBB Custom Coding”