Page 1 of 1
ello???
Posted: Mon Nov 13, 2006 8:04 pm
by lilyminako
I had developed a simple upload application using php...
I had tested the upload in local machine (example:
http://localhost/myrootdirectory/index.php) and it works...

but when i move the application to hosting server (example: http//
www.mydomain.com/index.php) , the upload doesn't work, the error was the files which been chosen to be uploaded couldn't copy into directory ( directory created to store uploaded files in website root directory) in server. Is it because of the server doesn't allow someone to write file into directory or i don't have the permission to write file into directory? I couldn't catch the error that cause this uploading fail.....
Thank you

Posted: Mon Nov 13, 2006 8:33 pm
by aaronhall
Forum Rules wrote:Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Is there any error message being printed to the browser after you try uploading the file? You may need to change the directory's permissions to allow writing (I think its chmod 700).
uploading problem
Posted: Mon Nov 13, 2006 8:40 pm
by lilyminako
first of all, sorry for the misleading topic been posted just now...
the error appear for sometimes only, which is change permisson to 0755 fail...but this error also appear during testing in local machine ( localhost) and the file still bein copy into the directory .....
thanx for the reply...

Posted: Mon Nov 13, 2006 8:55 pm
by aaronhall
Copy and paste the error here
Posted: Mon Nov 13, 2006 9:26 pm
by nickvd
change the permissions for the directory in question to 777...
Posted: Tue Nov 14, 2006 3:23 am
by Jenk
nickvd wrote:change the permissions for the directory in question to 777...
:s
755
Posted: Tue Nov 14, 2006 6:32 am
by Chris Corbyn
Change your thread title please.... I don't particularly want to have to do it for you and right now nobdoy knows what your thread is about without reading it.
Posted: Tue Nov 14, 2006 11:13 am
by nickvd
Jenk wrote:nickvd wrote:change the permissions for the directory in question to 777...
:s
755
How is apache going to write to a directory it does not have write permission to? Unless it's run in safe mode or suid it wont work... I would be nice if more hosts are configured to allow non 777 directories, but right now, that's not the case...
Posted: Tue Nov 14, 2006 11:15 am
by Jenk
Because hosts will configure apache (or rather the PHP executable) to run under the user id of the client (i.e. you)
Posted: Tue Nov 14, 2006 11:44 am
by nickvd
I have yet to see a host who configures things that way, hence the vast amount of documentation that (unfortunately) recommends writable directories being 777.
Don't get me wrong, I agree with you, I HATE having to set things to 755, but you do whacha gotta do.