RE: [PHP] Problem with PHP and mounted folder
| From: | Cliff Nieuwenhuis | Date: | Thu, 13 Mar 2014 21:38:59 +0000 |
| Subject: | RE: [PHP] Problem with PHP and mounted folder | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323053@lists.php.net to get a copy of this message | ||
On Fri, Feb 28, 2014 at 1:00 PM, Cliff Nieuwenhuis <c.nieuwenhuis@adcidesign.com> wrote:
Cliff Nieuwenhuis wrote:
[snip]
> The web application needs to read and create files in the projects folder, but
> PHP doesn't recognize the projects folder as folder! I suspect a
> permissions problem of some sort, but I can't figure out where.
[snip]
Aziz Saleh wrote:
> You guessed right. PHP usually runs under a user with less permissions (www, user, etc..). You
> are probably
> logged in as a user with permissions to access that mounted drive while PHP isn't. Both
> fixes are ugly, but
> what I would recommend is giving permission to those files as opposed to giving PHP user more
> power.
[snip]
Cliff Nieuwenhuis wrote:
> Thanks again for the suggestions. Here's a summary...
> is_file('projects/test.txt') -> FALSE
> file_exists('projects/test.txt') -> TRUE
> var_dump(stream_resolve_include_path('projects')) -> bool(false)
> var_dump(stream_resolve_include_path('projects/test.txt')) -> bool(false)
Just a follow-up in case anyone has a similar problem. I needed to add the 'noserverino'
option to the mount command. Once I did that, the php functions I was using on the mounted folder
worked as expected.
--
Cliff Nieuwenhuis