PDA

View Full Version : chroot?


stan
06-01-1999, 07:41 PM
I have some scripts that start with a require('somelibrary.php').

In order to make it invariant to the location in the directory tree I tried to use an absolute path for it, e.g. require('/big/dom/xdomain/www/lib/somelibrary.php')
That didn't work.

Found out that require('/xdomain/www/lib/somelibrary.php') does work. I guess that Apache does a chroot to /bin/dom/?

Is this last require statement a robust way to do it? Or does it rely to much on the current system configuration?

Stan

Terra
06-01-1999, 09:01 PM
This is a shift of the root for PHP3 safe mode...

PHP3 will not allow you to go beyond the preset... So in effect:
/big/dom == /

It's a pseudo chroot scenario...

--
Terra
--Will graduate from PHP3 safe mode school soon--
FutureQuest

SneakyDave
06-01-1999, 11:02 PM
Safe mode graduation? Do we all get diplomas!?