Re: Weird Permissions Problem With Includes



On Jan 30, 3:36 pm, "Carl" <c.gro...@xxxxxxxxx> wrote:
On Jan 30, 2:54 pm, "kwest" <kwes...@xxxxxxxxx> wrote:



I just setup a new server with PHP 5 and ran into a problem with
includes. Everytime I call something like

require_once './includes/test.inc'

I get a permissions message like this:

Warning: require_once(./includes/test.inc) [function.require-once]:
failed to open stream: Permission denied in /var/www/html/test2.php on
line 3

Fatal error: require_once() [function.require]: Failed opening
required './includes/test.inc' (include_path='.:/php/includes:/var/www/
html/includes') in /var/www/html/test2.php on line 3

I verified that apache has exectuble permissions all the way through /
var/www/html. As you can see my include path is correct (unless
someone sees something I don't). This is getting really frustrating as
I have spent several hour trying to debug this, any assistance would
be greatly appreciated.

I was able to run the script fine from the command line as well.

Does each included script have read permission as well?

Carl.

Sorry, that didn't come out right at all.

What I meant to ask was if the apache user had read access each script
you are trying to include? I don't believe that execute permission is
required.

Carl.

.



Relevant Pages

  • rundll32 printui.dll,PrintUIEntry /in /u /n
    ... a printer has to be installed (everytime. ... I am qutie sure that it happens because I run that script! ... got a message saying "a device attached to this computer is not working ... properl blar blar and keep on asking me to go back to Safe Mode, ...
    (microsoft.public.win2000.printing)
  • IIS 5.0 #exec cgi problems
    ... I have a Perl script called poplist-inc.pl. ... cgi is trying to use under SSI needs an execute permission set somewhere ... permssions on the entire web directory didn't fix the problem, ...
    (microsoft.public.inetserver.iis)
  • Re: hidding the content of a script
    ... >> feeding some nefarious endeavor but, thinking again, ... Execute permission don't really matter as long as ... Except when the script is setgid and is in the bin group ... ...
    (comp.unix.shell)
  • Re: Weird Permissions Problem With Includes
    ... Yes that is the weird thing, I gave read and execute permission to the ... If I run the script from the command line it works. ... Your error message indicates the Apache user does not have read access to the scripts. ... Or make the Apache user a member of the group which owns the file and give the file group read access. ...
    (comp.lang.php)
  • Re: How to identify a motherboard?
    ... I think everytime i will try to correct this this will get bfroken everytime, so I have added a sample script file at http://www.4shared.com/file/103946799/a8c31372/Win32_BaseBoard.html ... This basically is a WMI script using win32_baseboard class. ... for local computer ... Set filesys = CreateObject ...
    (microsoft.public.windowsxp.general)