>
> Thanks.
>
> What do you see if you run this?   "Can't open or create file!"
>
> Ethan


OK,

If you're running PHP as an Apache module, by default it won't have
permissions to write to the directory (this is by design to avoid security
issues.) You can do something like the following:


   1. Create a directory for writing files outside of your public directory
   (let's call it "uploads".)
   2. Change the group associated with the directory to Apache:
   sudo chgrp -R www-data /home/username/path/to/uploads
   3. Change the permissions on the directory so the group has write
   permissions:
   sudo chmod -R 2775 /home/username/path/to/uploads
   4. Then try the script again.

See if that works.

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com

Reply via email to