Forum Moderators: coopster
I've made a CMS system for a company website i'm working on, it worked on a previous testing server but they put google ads on it and that disrupted some features i needed to use. So now i'm using my own home pc as testing server, running XAMPP for WinXP.
Most is ok, but there's a problem with uploading files from a html form. The same code worked before so i think it's a config thing?
Here's the error message:
Warning: move_uploaded_file(./imgdir/filename.jpg): failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\site\cms\inc_imgupload.php on line 21
Warning: move_uploaded_file(): Unable to move 'C:\DOCUME~1\MyUserName\LOCALS~1\Temp\phpE3.tmp' to './imgdir/filename.jpg' in C:\apachefriends\xampp\htdocs\site\cms\inc_imgupload.php on line 21
The image filename does get listen in the article editor, but it's not actually uploaded. I'm guessing it's because the temporary file is stored in C:\Documents and settings\blabla instead of C:\apachefriends\temp or something like that? I'd like to keep everything within that folder anyway.
I suck at configuring these things (that's why i used XAMPP). Can any of you kind folks please tell me where /how i can configure this, or what else the problem might be?
Thank you.
if (is_uploaded_file($temp))
{
move_uploaded_file blah blah
}
else
{
file not uploaded
}
Have you checked that your path is correct? The destination folder will also need writeable permissions. ie: chmod to 777. I think the clue lies with this:
move_uploaded_file(./imgdir/filename.jpg)
dc