Problems with files!!!!!

From: Date: Sat, 31 Mar 2001 12:01:56 +0000
Subject: Problems with files!!!!!
Groups: php.general 
Request: Send a blank email to php-general+get-46441@lists.php.net to get a copy of this message
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!

« previous php.general (#46441) next »