First of all, you don't need to include WordPress files from
wp-admin folder because you are using
media_handle_upload in admin side. They are necessary only when you want to upload from front-end.
So you can remove these lines of codes:
$path = get_home_path();
require_once( $path . 'wp-admin/includes/image.php' );
require_once( $path . 'wp-admin/includes/file.php' );
require_once( $path . 'wp-admin/includes/media.php' );
Then, please try to fill the
action attribute of your
# because the empty value is not valid and it could make issues while submitting form.
Also non of your debug log is related to your codes.
media_handle_upload documentation for sample codes.
Edit: In order to debug your code and see what is result of upload, you can use
error_log function after activating
$attachment_id = media_handle_upload( 'fileToUpload', 0);
// Log results.
var_dump( $attachment_id );
error_log( ob_get_clean() );
Then you can check
wp-content/debug.log file to see what is happening.