I'm not using the latest version of PHP, so I don't have the automatic copy_uploaded_file function, so I'm trying to use exec() or system() to do a copy...
I get the temporary file name of the photo that was uploaded sitting in /tmp and I get its actual file name...
I print the command out before executing to make sure it's good, and it always is...
something like this is what comes out
mv /tmp/phpuShXxk /home/devfederal/photos/jeep.jpg
By inserting a while(1); in my code, I was able to freeze execution long enough to go to /tmp and verify that the file existed, and it did. Everything is fine, but when I pass the above command to system() or exec() it doesn't do anything... I even tried using `` back ticks to execute it... When I try to echo the result, nothing appears, even after saving the result to a var and then printing, as was recommended before.
I'm about to go insane. I can't figure out why the bloody mv isn't working. Is there some sort of security problem with system() that needs to be addressed in php.ini? I didn't see anything when I looked.
Any help appreciated...