I could do some guessing, but the real answer needs to come from the server admin. He has set the configuration and without knowing what he has done exactly, we are only guessing.
On the relative path. You should not use fully qualified paths since the app will fail if the admin relocated the virdir. Finally, depending on system OS and configuration, you cannot generally access directories that are above the physical location of the virdir. If you could do that, you could just keep going up until you came to the OS files and dump whatever you wanted. Certainly not a secure solution. For example, the IIS4.0 default used to allow that. The IIS5.0 defaults do not. In fact, they dont even allow the ..\..\ notation now. When you have a large group of shared files, the admin can set up an area with permission for the server process to access those files. Avoids duplicating them multiple times and solves the basic problem that you have. Jim --- In [email protected], "Bob" <[EMAIL PROTECTED]> wrote: > Thanks Jim, > So, I'll have to use a variable with the actual domain name i.e. > $baseaddr = "http://www.actualdomain.com/common/"; > > All the sub-domains use the same format, images, styles and common php modules. > Seems a waste to have to edit them all individual. > > I seem to remember reading somewhere that system admins don't like you to use absolute addressing. > Is this true, or I'm I mistaken? > > > > ----- Original Message ----- > From: "captain_jims" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Thursday, July 14, 2005 9:41 AM > Subject: [php-list] Re: sub-domains > > > > The answer to this question is that it depends on how the web server > > is setup. > > > > Simplifying greatly: > > First, virtual directories are established and then the domains are > > assigned to them. The root directory is usually the domain name and > > the default virtual directory. > > > > Then, the sub domain names are assigned to perhaps the same or other > > virtual directories. But most typically to directories that are lower > > in the directory structure that the domain related directory. > > > > Every virtual directory is a root, and the security settings of the > > server config do not allow you to go up the directory structure above > > the root, ie, the directory assigned to the virtual directory. > > > > In other words, the server admin is in control here. And he can build > > a variety of combinations. On my main server, I have multiple domain > > names pointed to the same virtual directory with different behaviors > > configured depending on the domain name used. Not what you want, but > > an example of how the server admin can change the behavior. > > > > Jim > > > > > > --- In [email protected], "Bob" <[EMAIL PROTECTED]> wrote: > >> If you've got sub-domains on a server, how do you access a root > > directory from a sub-domain? > >> As they are sub-domains, I obviously can't use > > $_SERVER['DOCUMENT_ROOT']; > >> > >> I thought $_SERVER['HTTP_HOST']; or $_SERVER['SERVER_NAME']; might > > do it, but it doesn't. > >> Is this possible? > >> TIA. Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
