Re[2]: SOLVED: Re: [PHP] Document root, preferred way to find it???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Tuesday, March 8, 2005, 12:03:54 AM, you wrote:
LG> Hello Tom,

LG> Sunday, March 6, 2005, 11:20:04 PM, you wrote:
T>> I do this for security as I have things in include that I don't
T>> want to be avaiable directly to the browser Also you don't need a
T>> path for include files you can just do:

LG> Don't necessarily disagree with you there other than if you place the
LG> includes outside the web accessible folders how do you address the
LG> managers of virtual hosts for the ability to modify, delete or add to
LG> their particular include file? Additionally, how do you address
LG> the naming convention of the include file.

LG> i.e.
LG> Site 'A' is using config.php
LG> Site 'B' is using config.inc.php
LG> Site 'C' wants to use config.php



T>> include('somefile.php');
T>> and it will be found regardless of where the script is located.

LG> That's true enough..

LG> BTW, good to see another TheBat! user here.

LG> Thanks again.

I only do stuff for my own server which actually creates a couple
 of server variables called:

 SERVER["DOMAIN_ROOT"] and SERVER["PHPINCDIR"] which have the same
 values as the script we just cobbled together for each virtual
 domain.
 I don't suffer from the problem of lack of access to the
 include directory, So all my domains follow this layout:

/usr/local/apache/domains/domain1.com //root and chroot for ftp
 access
/usr/local/apache/domains/domain1.com/www web document root

/usr/local/apache/domains/domain1.com/include for all include files

If a hosting provider locks you in to the document root it's time to
change provider :)
As for naming convention I use .inc and stop apache from serving .inc
files.

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux