title: WordPress File Upload always give PHP.ini error
body: <p>Using the media_sideload_image method (save from URL) works well, but for a actual uploads using the WP function <em>array(1) { ["error"]=> string(1) "s" }</em> it always gives me the following message. </p>
  
  <blockquote>
    <p>{ ["error"]=> string(212) "File is empty. Please upload something more
    substantial. This error could also be caused by uploads being disabled
    in your php.ini or by post_max_size being defined as smaller than
    upload_max_filesize in php.ini." }</p>
  </blockquote>
  
  <p>Which clearly means there was an error - why? I have looked at the PHP INI file and it doesn't appear to be that, is there another means of setting it?</p>
  
  <p><strong>PHP Code</strong></p>
  
  <pre><code>$upload_photo = $_FILE['upload_photo'];
  if ( ! function_exists( 'wp_handle_upload' ) ) require_once( ABSPATH . 'wp-admin/includes/file.php' );
   echo $upload_photo;
   $upload_overrides = array( 'test_form' =&gt; false );
   $movefile = wp_handle_upload( $upload_photo, $upload_overrides );
    if ( $movefile ) {
        echo "File is valid, and was successfully uploaded.\n";
        var_dump( $movefile);
    } else {
      echo "Possible file upload attack!\n";
    }
  </code></pre>
  
  <p><strong>HTML Code</strong></p>
  
  <blockquote>
    <p>input type='text' value='Photo URL' id='upload_photo_url'
    name='upload_photo_url' onclick="clear_field('upload_photo_url');"
    /></p>
  </blockquote>
  
  <p><strong>PHP Settings (printed from phpinfo())</strong>
  <img src="https://i.stack.imgur.com/aJEAV.jpg" alt="enter image description here"></p>