FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » is_dir true from cli, false from Apache
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: is_dir true from cli, false from Apache [message #178220 is a reply to message #178219] Wed, 23 May 2012 18:04 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/23/2012 1:24 PM, Robert Grimm wrote:
> On 2012-05-23 17:10:31 +0000, Jerry Stuckle said:
>
>> On 5/23/2012 12:45 PM, Robert Grimm wrote:
>>> I'm having trouble on CentOS 6 with PHP5. This is my test code:
>>>
>>> $dir = is_dir("/var/www/document_repository");
>>>
>>> Ultimately, I'm trying to get OpenDocMan working. That this test code
>>> fails shows why I can't get OpenDocMan working. I've tried everything I
>>> can think of. I've added a trailing /. I've put the directory in and out
>>> of the OpenDocMan directory, which has a directory definition in the
>>> Apache config. The user apache owns and has full access to the
>>> directory. I tested to make sure PHP was being run by apache with
>>> passthru("whoami");
>>>
>>> I posted my site configuration and phpinfo() output at
>>> http://opendocman.com/forum/viewtopic.php?f=4&t=667 in the last post on
>>> the page as of right now.
>>>
>>> What is really strange is that my test code works when I run it from the
>>> command line.
>>>
>>> This is a recent, clean install of CentOS. I have done no customization
>>> of the configuration files beyond defining the site in Apache. The site
>>> configuration has no PHP directives, as can be seen in the forum post
>>> linked above. What is going on? What do I have to do to get this
>>> working?
>>>
>>
>> Does the web server's user have access to the directory?
>
> The web server's user has ownership and read, write, and execute
> permissions on that directory.

OK, but IIRC, CentOS uses SELinux security contexts. Is that set up to
allow access to the directory (warning - I know very little about how
SELinux security works - just that it causes hassles like this).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: array_walk always passing 0 as the parameter
Next Topic: Re: Windows binaries 64bit for PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 14:26:52 GMT 2024

Total time taken to generate the page: 0.04823 seconds