You are here: Re: Upload script failing « PHP Programming Language « IT news, forums, messages
Re: Upload script failing

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация