title: Uploadify Success but No Files Uploaded?
body: <p>I am attempting to implement uploadify on a site.</p>
  <p>It says the files are uploaded but when I look in the upload folder nothing is there.</p>
  <p>I have read other post similar to this without luck.</p>
  <p>I did read <a href="https://stackoverflow.com/a/5936232/825757">this answer</a> to another question:</p>
  <blockquote>
  <p>I had similar problems on a Linux machine. It turned out that the PHP configuration on my server was the cuplrit. PHP was running in SAFE MODE. As I had uploaded the Uploadify scripts via FTP, so script files were stored in the file system with my FTP user details. Since PHP's temp folder was owned by the server root, I had a UID mismatch, i.e. the temporary upload file was attributed to root while the upload script that tried to move it was owned by the FTP user. That fragged it.</p>
  <p>To resolve this I changed the ownership of the uploadify php script to root and from there on it worked.</p>
  </blockquote>
  <p>I know little about server side coding as I am more a front end person. How do I change permissions? I am using 1&amp;1 Hosting.</p>
  <p>Here is a screenshot of the files on the server in FileZilla:</p>
  <p><img src="https://i.stack.imgur.com/PDBgD.png" alt="FileZilla Screenshot" /></p>
  <p><em><strong>EDIT</strong></em></p>
  <p>I tried to upload a ZIP file and it said the upload was successful but did not upload. However, I wonder if there is an error with my script because I should not have been allowed to upload a ZIP File because of this line in the PHP Script:</p>
  <pre><code>// Validate the file type
  $fileTypes = array('jpg','jpeg','gif','png'); // File extensions
  </code></pre>
  <p>Shouldn't the script reject the zip file?</p>
  <p>Below is my code I am using in case there is an error with the scripts and not my server:</p>
  <p><em><strong>JS</strong></em></p>
  <pre><code>$(function() {
      $('#file_upload').uploadify({
          'swf'      : 'uploadify.swf',
          'uploader' : 'uploadify.php',
          'onUploadSuccess' : function(file, data, response) {
              alert('The file ' + file.name + ' was successfully uploaded with a response of ' + response + ':' + data);
          } 
      });
  });
  </code></pre>
  <p><em><strong>PHP</strong></em></p>
  <pre><code>&lt;?php
  
   $targetFolder = '/uploads/'; // Relative to the root
  
   $verifyToken = md5('unique_salt' . $_POST['timestamp']);
  
   if (!empty($_FILES) &amp;&amp; $_POST['token'] == $verifyToken) {
  $tempFile = $_FILES['Filedata']['tmp_name'];
  $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
  $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];
  
  // Validate the file type
  $fileTypes = array('jpg','jpeg','gif','png'); // File extensions
  $fileParts = pathinfo($_FILES['Filedata']['name']);
  
  if (in_array($fileParts['extension'],$fileTypes)) {
      move_uploaded_file($tempFile,$targetFile);
      echo '1';
  } else {
      echo 'Invalid file type.';
  }
  }
  ?&gt;
  </code></pre>