View Single Post
  #1 (permalink)  
Old April 23rd, 2005, 02:25 PM
Ron_Bingham Ron_Bingham is offline
Registered User
 
Join Date: Apr 2005
Location: Cupertino, CA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Writing Files that can't be read

Thanks for a great book. I'm learning PHP and I ran into a problem I don't know how to solve.

Your first example in Chapter 7, check_image.php writes an uploaded file as 1.jpg (generally number.ext) into a directory set by me as /images. This directory has 'world' read/write privileges. However the file gets written with www as owner as the only one with read/write privileges and when the browser tries to render the 1.jpg file it is denied access and there is the broken file icon in place of the picture.

I’ve checked PHP.ini settings, tried different browsers to no avail. How can I relax these permissions on the file written by PHP?

Configuration is Apache/1.3.33 (Darwin) PHP/5.0.3 on a G4 Mac running OS X 10.3.9
Thanks for any help

Ron
Reply With Quote