creating files in OS X

From: Date: Sun, 11 Aug 2002 19:54:53 +0000
Subject: creating files in OS X
Groups: php.general 
Request: Send a blank email to php-general+get-112048@lists.php.net to get a copy of this message
Hi: I'm new to PHP. I'm running Apache/PHP/MySQL on Mac OS X 10.1.5 (PHP 4.1.2) and everything is working well except that I cannot create a file through PHP. If I create a file I can subsequently read/write from PHP, but only after I change its file permissions to read/write for everyone. When I run the code: if (!file_exists($filename)) { if (touch ($filename)) { print "$filename created"; } else { die( "Sorry Could Not create $filename"); } } I get the following: Warning: unable to create file test.text because Permission denied in /Library/WebServer/Documents/dev/testcreate.php on line 10 It's obviously a permissions problem but do not know what exactly to change nor where/how to change it. Thanks for any help. David

« previous php.general (#112048) next »