Added isset() and empty() validation to two vars

Adding debugging code to the top of the server code:

   error_reporting(E_ALL);
   ini_set('display_errors', TRUE);

Brought out warnings that variables that were not being set before use.  Caused the upload to fail because unexpected error descriptions were being dumped into the response. Used isset / empty logic to check those variables before use.

Also probably needs to be changed on any other server examples that use the same logic.