Jump to content

Upload Script Not Working Anymore


refiking

Recommended Posts

I have a script that runs on my development server (linux), but won't work on the live environment (iis).  I checked the php.ini settings and they are fine.  I even echoed the tmp name for the uploaded file and that shows, but it's not moving the file and I don't know how (if it's even possible) to display the reason why it's not doing so.  What can I check or alter?  Here's a snippet of the code:

 

echo "Temp file: " . $_FILES['uploadFile'. $x]["tmp_name"] . "<br />";
$copy = move_uploaded_file($_FILES['uploadFile'. $x]['tmp_name'], 'uploads/' . $file_name);

Link to comment
Share on other sites

Thanks, but yeah permissions are set.  I just did another google search and think I might've found the problem but still not the solution.  The live environment is Windows IIS and the test environment is linux.  And the temporary folder for windows retains the permissions of windows and not of the site.  Anyone have any experience with this kind of thing or a solution for it?

Link to comment
Share on other sites

Do some debugging, display all php detected errors. Temporarily add the following two lines of code immediately after your first opening <?php tag -

 

ini_set("display_errors", "1");
error_reporting(E_ALL);

 

What does the ['error'] element of the $_FILES array show? Any upload errors?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.