Re: Weird Permissions Problem With Includes
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sat, 03 Feb 2007 16:31:12 -0500
Carl wrote:
On Feb 2, 7:13 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:kwest wrote:Carl,Carl,
Yes that is the weird thing, I gave read and execute permission to the
incude I even chmoded them all to 777 to debug the problem and still
get the same error.>
If I run the script from the command line it works. So am guessing it
has to be something with Apache. I am using Apache 2 if that helps.
Thank You
- Ken
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.
PHP scripts are not executed. They are interpreted. You should not
have execute privileges on them.
Hi Jerry,
I think you misread the attribution on earlier posts in this thread
and mistakenly addressed your post to me instead of the orig poster,
Ken. I certainly never recommended that the scripts need execute
access, and actually suggested that they do not.
Yep, sorry. By the time I got here I had already read over 1500 messages in several newsgroups. To say my brain was a little fried would be an understatement :-). Sorry.
As a side note, PHP scripts can infact be executed by the shell
directly (using the "shebang" to invoke the PHP interpreter) when
calling PHP scripts from the command line, cron jobs, etc. In these
cases, execute privileges should be given to the user/group. This does
not apply to this case, however.
Yep, it doesn't apply, which is why I didn't mention it here. No use tossing in unnecessary complications.
Your error message indicates the Apache user does not have read access
to the scripts. But this can also show up if you give the file too many
privileges - like 777.
What?!? Why would setting a file permission to 777 deny read access?
It should do exactly the opposite, giving owner, group and all users
complete access to the file! Do you have any sort of reference or
citation for this claim?
@ Ken,
Because PHP doesn't like a file with *too much* permission. Can't say as I agree with the PHP developers - but it seems the check it at times and don't allow you to open a file with too much access.
For reference - search this newsgroup for other, similar messages. It pops up every couple of weeks. And while I've seen the problem, I've never seen this documented anywhere.
This thread was two days inactive when Jerry revived it, and I hope
you solved your problem by now. If not, double check the permissions
on the file and any directories leading to the file and post back if
your still having problems.
Cheers,
Carl.
Yea, sorry it took so long. Was busy rebuilding a crashed disk.
Try just giving it read access to everyone. Or make the Apache user a
member of the group which owns the file and give the file group read access.
Of course, you could also make the apache user the owner of the file.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- Re: Weird Permissions Problem With Includes
- From: Jerry Stuckle
- Re: Weird Permissions Problem With Includes
- From: Carl
- Re: Weird Permissions Problem With Includes
- Prev by Date: Re: I have sub-categories but want to display full category path
- Next by Date: Re: PHP shopping cart
- Previous by thread: Re: Weird Permissions Problem With Includes
- Next by thread: Re: mod_php or fastcgi for heavy loaded server?
- Index(es):
Relevant Pages
|