473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

setup question with open_basedir constraint

I accidently posted this over at php.general, but I don't generally get
a response over there, and I get a better response here, so I am posing
this question here as well. Hopefully someone has done something like
this and can offer some advice. Thanks in advance.

OK, I need some expert advice on how to do something like this. I have
an open_basedir restriction in place by my host, and I am hosting a few
sites (that will grow in the future).

What I want is something like this.

/mainsite - application files that I am creating would go here.
/site1 - folder for site 1
/site2 - folder for site 2

I would like to have all my application files underneath /mainsite like
this:

/mainsite
config.php
index.php
...

Then under /site1 and /site2 I would have symlinks (or php files with
include files in them) that would point to the same file in /mainsite

/site1
config.php - pointing to /mainsite/config.php
index.php - pointing to /mainsite/config.php
...

Same for /site2

Problem is I have open_basedir set, so that I can't get to
/mainsite/config.php from /site1/config.php

What are some of my options for setting this up? This would allow me to
essentially have one code base, and then anytime a site (say site1)
wanted a custom config.php file, I could replace the symlink config.php
file with one created just for them, but the rest of the code would
still be from the main code base.

ANyone have any ideas? I have tried to figure out the best way to
accomplish this, and essentially come upon roadblocks.

Would like to hear any ideas or suggestions. Thank you,

JJ

Jul 17 '05 #1
2 1355
DJ Majestik wrote:

<snip>

Then under /site1 and /site2 I would have symlinks (or php files with
include files in them) that would point to the same file in /mainsite

/site1
config.php - pointing to /mainsite/config.php
index.php - pointing to /mainsite/config.php
...

Same for /site2

Problem is I have open_basedir set, so that I can't get to
/mainsite/config.php from /site1/config.php

What are some of my options for setting this up? This would allow me to
essentially have one code base, and then anytime a site (say site1)
wanted a custom config.php file, I could replace the symlink config.php
file with one created just for them, but the rest of the code would
still be from the main code base.


If they're on the same filesystem, you could use hard links instead - but
it's kinda messy. Anything other than copying the files or changing the
open_basedir or document roots is going to be a bit of kludge.

C.
Jul 17 '05 #2
Thanks for getting back to me.

What are hard links? Can you help me out in that area? Thanks,

JJ

PS - might be my only option.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paul | last post by:
Hi Im testing a script to see if it works in different situations and open_basedir is one of them. However if i turn it On all i get is errors Warning: Unknown(): open_basedir restriction in...
3
by: Alvaro G Vicario | last post by:
This is the open_basedir restriction of my site: php_admin_value open_basedir /tmp/:/home/site/ All my PHP files are under /home/site/htdocs. However, I get lots of errors like: Warning:...
2
by: Brandons of mass destruction | last post by:
I'm trying to turn off open_basedir, and according to php.info, I've managed to do that in the master value column, by editing the php.ini file. But it's still on as local value for several...
0
by: jeff.battle | last post by:
I'm trying to get PEAR DB to work on my machine at serverbeach but I'm getting the following error: Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/DB.php) is not...
2
by: sreniaw | last post by:
Hello, I use php 5.1.4 with apache 2.2.2 on Solaris 10. The problem is that I can't configure open_basedir because I always get warming message: Warning: readfile() : open_basedir restriction...
1
by: janvdberg | last post by:
Hi, up until now I have used PHP4 as an Apache module which works lovely. I used to have the following line per VHost for a userdir: php_admin_value open_basedir /var/www/user/ This allowed...
1
by: lawrence k | last post by:
What is this about? If I ssh to my server and look at php.ini I see this: ; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most...
2
by: rdlowrey | last post by:
Okay, I've tried a bunch of things on this one and can't figure it out. The line in my phpinfo: open_basedir /var/www/vhosts/mysite.com/subdomains/intranet/httpdocs:/ tmp no value Why would...
3
by: Sarah | last post by:
I was wondering if someone might be able to help me with this issue. I have a feeling this has something to do with my host's server settings as I used to be able to get CURL to follow redirects by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.