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, Rahul Sitaram Johari <sleepwalker@xxxxxxxxxxxxxxxx> wrote:
> >     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

    Bah!  Sorry to give you false hope on that, Rahul.  I re-read the
post and my responses, and Apache would actually have nothing to do
with this particular problem.  In any case, in your httpd.conf file,
you can enable FollowSymLinks near your AllowOverride directives.  It
won't help in this case, but that's where it resides, nonetheless.

    If you `su -` to the user as which the PHP script is running, does
that user have permission to access the Windows share?  Are you
running this from the CLI or the web (I just noticed in the email you
just sent to Rob that it's a web error message).

    Try this:

    Take *just* that part of the script and run it from the CLI as
yourself to see if you can "see" the file.  If not, try it as root.
If you can, then `su -` to the account under which Apache is
daemonized.  You may need to update /etc/passwd to allow a shell to be
opened for that account.

    When running the simple script from the CLI as the web server
account, can you see the file?  Can you change to that directory?

    It may very well be that the account under which Apache runs is
jailed/chroot'ed.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished....

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