When PHP code
error_log("1. Error: " . $_FILES['uploaded_file1']['error']);
prints
"... stderr: PHP message: 1.Error: "
what does it mean? I expect that $_FILES['uploaded_file1']['error'] will return Error code from 0-8 and not Nothing.
PHP only populates $_FILES with keys that actually exist on the form. Imagine if it didn't. It would have to create $_FILES['a'], $_FILES['aa'], $_FILES['aaaaaaaaaaaa'] — in fact, it would have to fill in every possible field name in the universe (which is infinitely many) on the off chance you might try to look for an error code on one of them.
You should first check to see if isset($_FILES['uploaded_file1']) which tells you if PHP even attempted to look for a file with that name. If it's missing, that's not the same thing as UPLOAD_ERR_NO_FILE.
var_dump($_FILES['uploaded_file1'])show any content? It's possible that file field doesn't exist in the submitted data (either because there is no field with that name on the form or because it wasn't submitted with the rightenctype, or for some other reason). Certainly if I tried to access$_FILES['lalalalalafoobar']['error']that wouldn't exist either.UPLOAD_ERR_NO_FILE.