Re: PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

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

 



On 11/1/07 10:22 AM, "Daniel Brown" <parasane@xxxxxxxxx> wrote:

> On 11/1/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
>> On Thu, 2007-11-01 at 09:06 -0400, 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?

> 
>     Also make sure that it's not something simple that you may have
> accidentally overlooked as well:
> 
>     1.) Did you restart Apache after making any changes to php.ini or
> httpd.conf?
>     2.) The path is cAsE-sEnSiTiVe.  Did you make sure that it's
> EXACTLY the same?
>     3.) Is any part of that symlinked, and if so, does Apache allow
> FollowSymLinks?
>     4.) Is the account jailed or chroot'ed?

1) Checked! 
2) Checked!
3) It is symlinked indeed!! Where in httpd.conf do I need to specify
FollowSymLinks? I'm running Apache 2.2.6 with PHP 5.2.4 on Mac OS X 10.5
4) chroot'ed? Basically I'm mounting a windows network share on a share
point and during mount I'm giving it full read/write permissions.
(mount_smbfs -f 777 -d 777 //user:pwd@ip/share sharePoint)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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²
 

-- 
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