Re: Problems with files!!!!!

From: Date: Mon, 02 Apr 2001 01:14:16 +0000
Subject: Re: Problems with files!!!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46535@lists.php.net to get a copy of this message
On Sat, 31 Mar 2001 21:31, Ales Kunst wrote: > Hi, > > I have a strange kind of a problem. I'm cannot write to files on a > server (i'm having virtual host) where i got my domain name. > The server is running Apache 1.3.x and is having php3.0.8 installed. > The code looks like this: > > <html> > <body> > <?php > $fcontents = "something"; > $fp = fopen("tmp/some.dat", "w"); // trying to open file in my > directory tmp/ (i think) > fwrite($fp, $fcontents); > fclose($fp); > ?> > </body> > </html> > > I cannot write to directory tmp.I get an error from Netscape that > "document contains no data" (i changed the directory mode to 777 > (tmp/)). The strangest part is that this script works fine when i am > running it at home. At home i tried to run the script under Windows 98 > and Linux Mandrake both with Apache 1.3.x with php 4.0.x installed (i > don't think this code should have any compatibility problems). On Linux > i have put the script to a user directory, just the kind on the server > is, and it worked just fine. I think maybe it's the Apache > configuration (on the server) which is causing my problem. I would very > appreciate any help on this matter (clues what could be wrong). > > Ales! Probably permissions still - the parent directory must also be accessible to the user that the web server runs as. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#46535) next »