PHP Warning: File upload error – unable to create a temporary file in Unknown on line 0

Apache2PHPubuntu-14.04

My ubuntu vps' php was uploading images fine while running php5, but after upgrading to php5.6 all websites on my vps are no longer uploading images I keep getting this error

PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0,

What could be the problem and how can i fix it ?

Best Answer

There where some changes regarding the upload directory between php5 and php5.6 see the changelogs, you can do then a search for the upload term.

Here an interesting bug #67551

My first advice would be to verify the config of your upload directory

If it's not the issue look at the other fix regarding the upload between Php5 and 5.6

EDIT: you can also have a look at this answer, but you should set the right properly, chmod 777 is a big security hole .