Page 1 of 1

Is this possible ? Portal on another subdomain

Posted: 7. February 2009 18:01
by Greight
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner
Boardlink:

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
Hey friends
My question is just clear
I want to know whether this is possible or not. I want to put the portal on my main site and the forum in its original location intact. Is this possible ?
Thx

Re: Is this possible ? Portal on another subdomain

Posted: 7. February 2009 18:09
by Kevin
Oh, interesting question.

A few things, that are definitely needed:
- You need to have access to the forum DB from your root domain.
- The root directory of your forum is contained in the main directory of your root domain

And then there have to be several things done, to get it properly linked to your forum.

But in general: it might work - with a bunch of things to do. But you are the first one with this approach, so nobody have tried it before. ;)

Re: Is this possible ? Portal on another subdomain

Posted: 7. February 2009 20:02
by Greight
Well as u said this is quite interesting and professional , I wonder why Im the first one who wants this.
I couldnt understand what is forum DB and root admin :oops: anyway can u tell me how I can do that ?

Re: Is this possible ? Portal on another subdomain

Posted: 7. February 2009 21:21
by Kevin
We'll, it's quite unusual to mix a domain with a subdomain. Normally you just link from one to another.
In this case you are trying to run one application (as you can see phpBB including mods), spreading the belonging and depending files over two different domains and locations. This is defiantly tricky. Like running one Microsoft Word on two computer, having half of it installed on each. ;)
But some people are running the forum in a subdirectory and want to have the portal inside the root directory.
For those i have written this KB article:
Moving portal.php outside of your forums directory
This might help you.
Greight wrote:I couldnt understand what is forum DB and root admin
As i dont know how your web / hoster configuration is, i tried to ask:
- Do you have access from your root domain (e.g. domain.com) to the database of your forum, running in the subdomain (forum.domain.com)?
- As we need access to several phpBB root files: where are your domain and subdomain files located? Do we have access to the subdomain files from the domain directory?
If you take a look in your FTP program: does it look something like this?
- htdocs/domainroot/ <-- root directory of domain.com
- htdocs/domainroot/subdomainroot/ <-- root directory of forum.domain.com

Re: Is this possible ? Portal on another subdomain

Posted: 7. February 2009 22:38
by Greight
Yeah I use cuteftp and can access subdomains directory from the root.

SO first I should create the portal and then using the steps u provided in the link, I must move portal to my main site. Is that correct ? :idea:

Another question , if I install this portal and then phpBB gets updated what happens ? Will the portal remain intact ?

Thx

Re: Is this possible ? Portal on another subdomain

Posted: 8. February 2009 22:34
by Greight
what happened
Dont u wanna answer ? :?:

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 00:49
by Greight
I triewd that
Seems impossible becase I cant set this pass :

Code: Select all

    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';  
The forum is in forum. and I want to put portal.php in x.ir , so now I understand what you meant. If anything came to ur mind about this please tell me.

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 09:09
by Greight
The path also is as u said but there is a httpdocs folder interfering this, i . e .forum is in
/subdomains/forum/httpdocs
main site is in
/httpdocs

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 09:12
by Kevin
Greight wrote:The forum is in forum.enz.ir and I want to put portal.php in enz.ir , so now I understand what you meant. If anything came to ur mind about this please tell me.
As stated before - in this example:
<em>Kevin</em> wrote:- htdocs/domainroot/ <-- root directory of domain.com
- htdocs/domainroot/subdomainroot/ <-- root directory of forum.domain.com
The line would look something like this:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './subdomainroot/'; 
*edit*
Just read your last post during writing this.
You may try to use the line this way:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../subdomains/forum/httpdocs/'; 
But as i said before: You have to have access to the database from this location!

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 20:35
by Greight
Thx :P
I tested the last one and gave me this error :

Code: Select all

Warning: include() [function.include]: open_basedir restriction in effect. File(../subdomains/forum/httpdocs/common.php) is not within the allowed path(s): (/var/www/vhosts/x.ir/httpdocs:/tmp) in /var/www/vhosts/x.ir/httpdocs/portal.php on line 20

Warning: include(../subdomains/forum/httpdocs/common.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/x.ir/httpdocs/portal.php on line 20

Warning: include() [function.include]: open_basedir restriction in effect. File(../subdomains/forum/httpdocs/common.php) is not within the allowed path(s): (/var/www/vhosts/x.ir/httpdocs:/tmp) in /var/www/vhosts/x.ir/httpdocs/portal.php on line 20

Fatal error: Can't load ../subdomains/forum/httpdocs/common.php, open_basedir restriction. in /var/www/vhosts/x.ir/httpdocs/portal.php on line 20

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 21:18
by Kevin
"open_basedir restriction in effect. File(../subdomains/forum/httpdocs/common.php) is not within the allowed path(s)"
Yeah, this is what i have talked about. ;)
Access from one domain to another. The only one, who could help you is your webhoster.
But i think i can already say that he will say "no" for security reasons.
Once again: this is really unusal and securitywise a bad idea.

Re: Is this possible ? Portal on another subdomain

Posted: 14. February 2009 22:53
by Greight
So this seems virtually impossible
What about doing a trick ;)
If I make a subfolder and put portal in it , then use a redirector on the main site that redirects users there ,from there they can access portal while forum.x.ir brings them directly to the forums. So can you give me a php redirector ? Ive seen and am using java versions but I think they are not dependable.
Thx a billion ;)

Re: Is this possible ? Portal on another subdomain

Posted: 15. February 2009 10:48
by Greight
I suppose this is also impossible because the forum should be in the subfolder !
Am I right ? :?

Re: Is this possible ? Portal on another subdomain

Posted: 15. February 2009 12:29
by Greight
Ok another idea :idea:
I dont edit .htaccess file so forums index is the home page :idea:
So can anybody give me a php redirector ?