I was having a similar problem after changing to PHP 5 (I was using the @ upload method and it was deprecated, so I had to start using CURLFile), and the solution to my problem was found in this stack.
Solution: curl upload won't work with relative paths, use the full path instead