move_uploaded_file returns true but file does not appear in folder

file, move, php

Solution

The move likely succeeded, check the following:

- You don't have access to view the file. Use `chmod("/path/to/file.ext", 0755);` to add view rights for the ftp user.

- You moved the file to an location that doesn't store the file. `/dev/null`

- You're looking in the wrong folder. Did you use a full path?

- The file is removed shortly after the move.

Problem

I have a couple of scripts that worked fine on another server. Now that I have moved everything on to a new server, the file does not appear in the destination folder. The strange thing is that `move_uploaded_file` returns `true`. Also, I printed the post data and there is no error. Can you guess what's possibly going on. The files I am trying to upload as a test are very small ( 10 kb).

Original source