Hi Paul:

Thanks, that worked.

Cheers,
David
On Sunday, August 11, 2002, at 07:11 PM, Paul Colcutt wrote:

> Hi,
>
> you need to set the permissions for the directory youre creating the 
> file in.
> Try typing (or copy and paste):
>
> chmod  777  /Library/WebServer/Documents/dev
> into Terminal... should do the trick.
>
> Two neat apps you can use for setting permissions and ownership via a 
> GUI:
> 'Super GetInfo' by BareBones Software http://www.barebones.com/  and
> 'BatChmod' Freeware by Renaud Boisjoly  
> http://www.macchampion.com/arbysoft
>
>> 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
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> -- =======================
> Paul Colcutt
> http://www.paulcolcutt.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to