Hi Micahel,

First, to answer your questions:

user/group on /tmp  root:root
r/w permissions on tmp :  rwxrwxrwxt

Now Apache + PHP is loaded in /home/web/apache (root:root) with (rwx r-x r-x) 
on all subdirectories including /htdocs where graffiti.php resides. I've 
tried placing graffiti.dat in /htdocs and in /tmp, and even created a new 
dierctory /home/web/apache/tmp directory. Nothing works.

Tried changing (chown -R apache:apache /home/web) and (chown -R andre:andre 
/home/web) -- nothing works. [What is the problem with this setup? I've had 
so much trouble with Apache and PHP!]

What permissions, user/group should Apache + PHP have? User is in Apache 
group, also tried putting user in the Nobody group.

Where should I look? The error log indicate: 

[Sun Feb 10 13:01:31 2002] [error] PHP Warning:  fopen("/tmp/graffiti.dat", 
"a+") - Permission denied in /home/web/apache/htdocs/graffiti.php on line 18
        [[[ $handle = fopen ($filename, "a+"); ]]]
[Sun Feb 10 13:01:31 2002] [error] PHP Warning:  Undefined variable:  
graffiti in /home/web/apache/htdocs/graffiti.php on line 22
[Sun Feb 10 13:01:31 2002] [error] PHP Warning:  Supplied argument is not a 
valid File-Handle resource in /home/web/apache/htdocs/graffiti.php on line 22 
         [[[ fputs ($handle, $graffiti); ]]]

[Sun Feb 10 13:01:31 2002] [error] PHP Warning:  Supplied argument is not a 
valid File-Handle resource in /home/web/apache/htdocs/graffiti.php on line 25

Thanks for your advice,
Andre



On Sunday 10 February 2002 00:43, you wrote:
> There are several things to check....
>
> For example which user / group owns /tmp?
>
> What are the read / write permissions on /tmp?
>
> If nobody does not have write privileges to /tmp, the file will not get
> updated.
>
> Michael
>
> --
> Michael Viron
> Registered Linux User #81978
> Senior Systems & Administration Consultant
> Alumni Representative, Online Operations
> Web Spinners, University of West Florida
>
> At 03:14 PM 02/09/2002 -0500, Andre Dubuc wrote:
> >Finally, I have working copies of Apache 1.3.22 and PHP 4.1.1 on my LM8.0
> >box. Apache has been set up with "nobody' permissions, and I write test
> >scripts as root and place them in /home/web/apache/htdocs.
> >
> >I can read scripts from this directory, but I've tried to use:
> >. . . excerpt . . .
> >
> > $filename = "/tmp/graffiti.dat";
> > $handle = fopen ($filename, "a+");
> > fputs ($handle, $graffiti); [I've also tried fwrite]
> > fclose($handle);
> >
> >. . .  followed by a form that takes $graffiti as input . . . and then a
> > php script that displays the contents of the appended $filename . . .
> >
> >And no matter what I try, nothing is written to "graffiti.dat" -- I've
> >checked that it is writeable. Somehow, I think it's related to permissions
> >and the group "nobody". I've written the script as root, and another as
>
> user.
>
> >Neither works. Apache (temporarily) is run at root -- I'm just learning
> >Apache and PHP -- this is a developmental setup, not connected to the
>
> outside.
>
> >If there are any gurus that can help me, I'd appreciate it. Permissions
> > are set otherwise to 755.
> >
> >I'm obviously not clear on the concept of "nobody" and how it affects
>
> running
>
> >of scripts. Who cn arun these, if it's set to "nobody"?
> >
> >Tia,
> >Andre
> >
> >
> >
> >
> >--
> >Please pray the Holy Rosary to end the holocaust of abortion.
> >Remember in your prayers the suffering souls in Purgatory.
> >
> >May God bless you abundantly in His love!
> >
> >For a free Cenacle Scriptural Rosary Booklet --
> > http://www.webhart.net/csrb/
> >
> >Want to buy your Pack or Services from MandrakeSoft?
> >Go to http://www.mandrakestore.com

----------------------------------------
Content-Type: text/plain; charset="us-ascii"; name="message.footer"
Content-Transfer-Encoding: 8bit
Content-Description: 
----------------------------------------

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.

May God bless you abundantly in His love!

For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to