title: I can upload files on remote server, not locally on XAMPP
body: <p>I use this script for uploading an image file. It should allow to upload jpeg, jpg and png files. </p>
  
  <p>Everything works on remote server, but I can't upload it locally, on XAMPP server. I tried all tips mentioned in this thread <a href="https://stackoverflow.com/questions/3586919/why-would-files-be-empty-when-uploading-files-to-php">Why would $_FILES be empty when uploading files to PHP?</a> but no one worked.</p>
  
  <p>Thanks for help</p>
  
  <p>Form:</p>
  
  <pre><code>&lt;form class="form-horizontal" action="potwierdz.php" method="POST" enctype="multipart/form-data"&gt;
      &lt;fieldset&gt;
  
          &lt;!-- Form Name --&gt;
          &lt;legend&gt;Dodawanie produktu&lt;/legend&gt;
  
          &lt;!-- Text input--&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="produkt_nazwa"&gt;Nazwa&lt;/label&gt;  
            &lt;div class="col-md-4"&gt;
                &lt;input id="produkt_nazwa" name="produkt_nazwa" class="form-control input-md" required="" type="text"&gt;
                &lt;span class="help-block"&gt;Podaj nazwę produktu&lt;/span&gt;  
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- Text input--&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="producent_nazwa"&gt;Nazwa producenta&lt;/label&gt;  
            &lt;div class="col-md-4"&gt;
                &lt;input id="producent_nazwa" name="producent_nazwa" class="form-control input-md" required="" type="text"&gt;
                &lt;span class="help-block"&gt;Podaj nazwę producenta produktu&lt;/span&gt;  
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- Textarea --&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="producent_adres"&gt;Adres producenta&lt;/label&gt;
            &lt;div class="col-md-4"&gt;                     
              &lt;textarea class="form-control" id="producent_adres" name="producent_adres" required=""&gt;&lt;/textarea&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- Select Basic --&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="produkt_kategoria_nazwa"&gt;Kategoria&lt;/label&gt;
            &lt;div class="col-md-4"&gt;
              &lt;select id="produkt_kategoria_nazwa" name="produkt_kategoria_nazwa" class="form-control"&gt;
                  &lt;option&gt; &lt;/option&gt;
              &lt;/select&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- File Button --&gt; 
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="obraz"&gt;Zdjęcie&lt;/label&gt;
            &lt;div class="col-md-4"&gt;
              &lt;input id="obraz" name="obraz" class="input-file" type="file"&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- Button --&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4 control-label" for="wyslij"&gt;&lt;/label&gt;
            &lt;div class="col-md-4"&gt;
              &lt;button id="wyslij" name="wyslij" class="btn btn-primary"&gt;Dodaj&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>here is script:</p>
  
  <pre><code>&lt;?php
  
      $errors= array();
        $file_name = $_FILES['obraz']['name'];
        $file_size =$_FILES['obraz']['size'];
        $file_tmp =$_FILES['obraz']['tmp_name'];
        $file_type=$_FILES['obraz']['type'];
        $file_ext=strtolower(end(explode('.',$_FILES['obraz']['name'])));
  
        $expensions= array("jpeg","jpg","png");
  
        if(in_array($file_ext,$expensions)=== false){
           $errors[]="extension not allowed, please choose a JPEG or PNG file.";
        }
  
        if(empty($errors)==true){
           move_uploaded_file($file_tmp,"obrazki/".$file_name);
           echo "Success";
        }else{
           print_r($errors);
        }
  
  ?&gt;
  </code></pre>
  
  <p>It returns me "<strong>extension not allowed, please choose a JPEG or PNG file.</strong>"</p>
  
  <p>It's also printing 
  Notice: Undefined index: obraz
  whenever I use <code>$_FILES['obraz']['...']</code> variable.</p>