Jump to content

Yet another Upload via PHP problem...


blirette

Recommended Posts

Hi,

 

I've search other topics and couldn't quite find the answer I needed. Anyway, here's the problem.

 

I usually have an upload function that works on different hosts. Normally, it's just a cut/paste and voilà! But now I have some trouble. Weird behaviors are :

 

- $_SERVER['DOCUMENT_ROOT'] not returning anything

- is_writable() return true on the upload folder but I get a permission error on that said folder when I use move_uploaded_file()

 

Here are the errors:

 

Warning:  move_uploaded_file(D:\vhosts\somerandom.ca\httpdocs\fr\medias\images\nouvelles\petites\test_francais_tn.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in D:\vhosts\somerandom.ca\httpdocs\testupload_01.php on line 26

 

Warning:  move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\php16B.tmp' to 'D:\vhosts\somerandom.ca\httpdocs\fr\medias\images\nouvelles\petites\test_francais_tn.gif' in D:\vhosts\somrandom.ca\httpdocs\testupload_01.php on line 26

 

I used the PHP manual upload example just to be sure the code was ok.

 

Anyone able to help me with this weird behavior?

 

Thanks! I'll go see if I can help others in some other posts while I wait for a desperate answer! ;)

 

PS: The "somerandom.ca" is bogus ;)

Link to comment
https://forums.phpfreaks.com/topic/118643-yet-another-upload-via-php-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.