|
Posted by Rami Elomaa on 06/02/07 16:41
Geoff Berrow kirjoitti:
> I have an upload script which I want to use to upload word documents.
> This works fine on my Gradwell account. However on the client's
> (windows) hosting it fails.
>
> C:\WINDOWS\TEMP\php29D.tmp
> Warning: copy(papers/1180718015test.doc) [function.copy]: failed to open
> stream: Permission denied in
> \\nas01\nas\i\s\isbe2007.org\web\uploaddoc.php on line 22
>
> I emailed support (Namesco) and received this reply
>
>>> There is no need to change permissions on Windows hosting. Your files by
>>> default have the permissions to write to directories owned by your own
>>> user.
>
> Any suggestions?
>
Did you try move_uploaded_file() instead of copy()? If the host has
configured php to safe mode, this might make a difference.
It also might be that the host company are wankers who don't know their
heads from their asses, but the basic thing is that when you handle
uploaded files, you should always use move_uploaded_file() instead of
copy, and it's worth testing at least.
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Navigation:
[Reply to this message]
|