Strange things happen when you manipulate files with php.