One thing that should give you an error (from looking at the code piece you've posted anyway), is
if($GuildData !=none) {
Notice that there has been no use of $GuildData before, so it's undefined. This should give you an E_NOTICE error: "Notice: use of undefined variable GuildData in somefile on line NN
An undefined variable will default to null.
The line also contains a second error: Notice: "use of undefined constant none - assumed 'none'
This means that no constant named "none" has been defined, so the PHP parser assumes that you meant to write 'none', i.e. the string literal 'none'.
So, despite your errors, the script is allowed to run, but the code actually could be replaced by
if (null != 'none')
# and that can be rewritten to
if (true)
While this means that your script would always try copying a file, wether there is one or not (the things you check for has no correlation with the presence of an uploaded file). What you should check for, as brad pointed out (reread his post)
if ($_FILES['GuildData'])
{
}
else
{
printf('File upload error: %d', $_FILES['GuildData']['error']);
}
And if you do get that output, you go here to see what it means.
Concerning the error message you posted, you still havn't made the suggest change by brad: change copy to move_uploaded_file. Once again, reread his post, and follow his advice.
Also, notice that your code essentially matches my description below
if ('the uploaded file was named guild.xml')
{
if ('copy from temp directory to roster/uploads/FILENAME was successful')
{
echo 'Success';
}
else
{
echo 'Error';
}
}
if ('could not open file roster/uploads/FILENAME')
{
die("could not open XML input");
}
You always try to open the file roster/uploads/FILENAME. You don't care at all about wether you managed to create that file or not. Also, note that in the first if block, you have an if-else pair. If the code executes, one of those MUST be executed and one contains "echo 'success'", the other contains 'echo "error"'. Brad asked which one was shown. And either must be sent as output. If not, you have fatal errors in your script which means that it fails to run completely.