UPLOADING FILES ERROR! CAN't WRITE...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fwing
Forum Newbie
Posts: 4
Joined: Mon Jun 19, 2006 2:15 am
Location: malaysia

UPLOADING FILES ERROR! CAN't WRITE...

Post by fwing »

I am trying out an uploading program that output this error msg:

Error report, sending files to server
Not allowed to write to dir:/upload/


The scripts are stored in server under public directory having this permission 0755.
Is the program script missed out the login parts? How to do it in PHP - to submit my account name and password?
TQ.
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Either change the ownership of that directory to the user your webserver runs as, otherwise chmod 766 it. Your webserver needs write access.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Are you trying to write to /upload/ or something like /var/www/apache/htdocs/yoursite/upload/?

/upload/ isn't going to work.
fwing
Forum Newbie
Posts: 4
Joined: Mon Jun 19, 2006 2:15 am
Location: malaysia

UPLOAD PROBLEM!

Post by fwing »

I am trying to upload file from PC to My Server under my account http://www.abc.com. I want to use

is_uploaded_file() and move_uploaded_file()

to do the uploading. Now I notice the destination directory is having pemission 0755 and I failed.
Do I better use the PHP ftp function to log in and then use the respective uploading functions for the jobs?
TQ.
Post Reply