Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Open_basedir Issue
Carson
post Mar 9 2008, 12:54 AM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 340
Joined: 29-April 07
Member No.: 42,353



I use my trap17 account for a website and a forum. Both are a big part of the site, and community based. Members can add content to the website as well, and post on the forums.

I need both softwares to be integrated, so members can register on the forums and be able to use their account for both the forum and the website. That is not the issue though, I have had them integrated, but since open_basedir was enabled, I'm obviously getting an error.

For the forum to access the necessary files from the website, it needs to access them in a higher directory, which open_basedir does not allow. So if it stays like it is now, my members will have to make two accounts.

Furthermore, I have to make all the content on the website viewable by all guests, just so members don't have to register twice. I would like to make some content on the site only viewable by members, but I cannot make them register twice.

What are options here, if any? Is it simply impossible to get the integration of the two softwares to work?
Go to the top of the page
 
+Quote Post
jlhaslip
post Mar 9 2008, 01:23 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,993
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Can you give us information above the structure of these Application installations so that we might be able to assist you further? Where is the 'problem' file located now, for example. What is the Directory structure of the Applications? Is there a configuration file where you specify the structure or URLs?
We need to know more than what you have supplied so far.

Thanks.
Go to the top of the page
 
+Quote Post
Carson
post Mar 9 2008, 03:16 AM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 340
Joined: 29-April 07
Member No.: 42,353



Ah, Okay.

Well the website is located in the root folder(public_html), and the forum in a forums directory. So for example my website is located at mydomain.trap17.com/, and the forum at mydomain.trap17.com/forums/.

The integration script has a configuration script for both the forums and website. The configuration script located in the forums directory requires a set physical path(which is "/public_html") and a URL to the website. I think this is where open_basedir comes into play.

The other configuration script located in the websites directory is pretty much the same. It requires the physical path of the forum("/public_html/forums") and the URL.

This is the actual error I'm getting:
QUOTE
Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(/public_html/forums/bpforum/configuration.php) is not within the allowed path(s): (/home/marked/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/marked/public_html/forums/bpforum/bpforumconfig.php on line 24

Warning: require_once(/public_html/forums/bpforum/configuration.php) [function.require-once]: failed to open stream: Operation not permitted in /home/marked/public_html/forums/bpforum/bpforumconfig.php on line 24


So I think it is trying to access the configuration file of the website, but doesn't have permission. The forum and website run fine until a member logs in or out, or when editing members etc.
Go to the top of the page
 
+Quote Post
jlhaslip
post Mar 9 2008, 03:27 AM
Post #4


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,993
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Place a copy of the website config file in the /forum sub-directory and change the information required in the website pages to find it there. The file needs to be opened by both softwares, right? so it needs to be in the lowest folder of the bunch.

Any further questions, post back here.
Go to the top of the page
 
+Quote Post
Carson
post Mar 9 2008, 04:54 AM
Post #5


Super Member
*********

Group: [HOSTED]
Posts: 340
Joined: 29-April 07
Member No.: 42,353



Thank you for your reply.


I do have a question though. The file that both softwares need to access is the configuration.php file. To setup the directory to access this, the code is:
CODE
require_once($bpfConfig['joomla_path'].DS."configuration.php");


I have this file(configuration.php) moved to forums/bpforum (bpforum being the sub-driectory of the forums directory, where one of the config files that access's configuration.php is located).

So how would I alter that line to point to the configuration.php file, and not being affected by base_opendir?
Go to the top of the page
 
+Quote Post
jlhaslip
post Mar 9 2008, 06:20 AM
Post #6


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,993
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



I don't know Joomla well enough to be able to answer that.
Go to the top of the page
 
+Quote Post
Carson
post Mar 9 2008, 07:43 AM
Post #7


Super Member
*********

Group: [HOSTED]
Posts: 340
Joined: 29-April 07
Member No.: 42,353



I opened up some other php scripts to see how the require_once function works when retrieving files in the same directory. I managed to get it to work. Must be a coincidence I was able to get it working though.

This what I did:
CODE
define('CONF_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );

require_once ( CONF_BASE .DS.'configuration.php' );


To check it was actually pointing to that actual configuration file, i changed the name in the script and got an error. Other things I tried I didnt get an error, but it wasn't pointing to any particular file either. I think all is working now.

Thanks for the help jlhaslip.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Open Office Vs Microsoft(42)
  2. [help] Java Script: Window.open(8)
  3. Open Source Web Design(50)
  4. Ferentus(6)
  5. Dreamweaver Permissions Issue(5)
  6. Open Php Page From Another Server(7)
  7. Files With Mdf Extension(6)
  8. Study: Tumor Risk From Cell Phones(14)
  9. How To Open A .daa File(39)
  10. Linksys Befw11s4 Wireless Router Issue(11)
  11. Informix To Sql Server (or How To Open .unl Files)(2)
  12. Aef - Free Forum Software(8)
  13. A List Of Great Free Software(9)
  14. Ie 7 Issue With Ajax(2)
  15. Open Source Movement(2)
  1. Open Grave Chili(1)
  2. Overpopulation(7)
  3. Registration Form?!(6)
  4. Issue With Windows Vista - Sound Card Acting Wierd [resolved](4)
  5. Cannot Open Display - Error(2)
  6. Can't Access My Site....weird Issue(5)
  7. Flash Wmode(transparent) Pramater In Firefox3(on Linux) - Not Working(1)
  8. Free Icon Sets For Open Source Projects(0)
  9. Harddrive "open With..." Problem(1)
  10. How To Open Multiple Tabs?(6)
  11. I Can && Cannot Acces My Website(5)
  12. Open Program Copyrights For Third World Nations(7)
  13. Ftp Issue?(1)


 



-