You are not logged in.

#1 2005-02-16 15:15:25

vinyl
Member
Registered: 2004-07-06
Posts: 33

[apache/php] PHP error

I get this error after I follow the steps in this document on the arch wiki:

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/home/httpd/html/index.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0

(document on wiki is: http://wiki2.archlinux.org/index.php/Ap … nd%20MySQL

What is this kind of error ??

Offline

#2 2005-02-16 15:39:26

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: [apache/php] PHP error

i expect your apache running as nobody so try this on the file you're trying to access:

$ chown nobody /home/httpd/html/index.php
$ chmod u+r /home/httpd/html/index.php

I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#3 2005-02-16 15:50:36

vinyl
Member
Registered: 2004-07-06
Posts: 33

Re: [apache/php] PHP error

I hope I dont have to do that for every file I put in my webroot ?

Offline

#4 2005-02-16 15:52:15

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: [apache/php] PHP error

well, you have to make sure the files you put there are at least readable by the user apache is running as. the default in arch is nobody.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

#5 2005-02-16 15:52:51

vinyl
Member
Registered: 2004-07-06
Posts: 33

Re: [apache/php] PHP error

And how would one to that?

Offline

#6 2005-02-16 15:56:03

kth5
Member
Registered: 2004-04-29
Posts: 657
Website

Re: [apache/php] PHP error

simple, don't chmod files. they should always automaticly be readable to anyone per default when you create them.
when you simply copy them over from somewhere else make sure the source file's permissions are like you expect your target to be. if you doubt that cp preserves the permissions run

$ cp -a source destination

this might only work as root though.


I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell

Offline

Board footer

Powered by FluxBB