Rahul Sitaram Johari wrote:
Ave,
Somehow my PHP won't access, won't even acknowledge the existence of a file
that is outside the /Library/WebServer/Documents folder. This was never a a
problem before in any Mac version - it just started with Leopard.
I don't know what has changed where, in httpd.conf or php.ini or somewhere
else, but something changed that's crippling access to files outside of the
webserver.
This Works in Mac OS X 10.3.9 (i.e., prints File Exists) but the same exact
script does not work in Mac OS X 10.5, and yes, the file is available in
Leopard in the mentioned location - path is exact same - permissions are all
set:
$filename = "/Users/username/Documents/Transfers/test.txt";
if (file_exists($filename)) {
echo "The file $filename exists<br><br>";
} else {
echo "The file $filename does not exist<br><br>";
}
I¹ve already checked safe_mode which is Off and open_basedir which is not
set same settings as php.ini from before.
Any ideas what might be causing this?
Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rahul Sitaram Johari
CEO, Twenty Four Seventy Nine Inc.
W: http://www.rahulsjohari.com
E: sleepwalker@xxxxxxxxxxxxxxxx
³I morti non sono piu soli ... The dead are no longer lonely²
Sounds like a clear case of Apache being chroot'ed.
This is based off the BSD style setup I believe. Which I believe Mac uses, So, I would check your
startup line for Apache. I did some googling, but I could not find anything to confirm my thinking
that the Mac Apache configuration is anything like the default OpenBSD setup.
I know you can manually start httpd with the -u flag to disable chrooting
Again, I can't find any examples of the Mac setup, but my money would be on chrooting as the problem.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php