There was the following problem. 2 pictures are loaded.
Everything rises on this function.

move_uploaded_file($_FILES['goodsImage']['tmp_name'], $kernelVars['goodsDir'] . $imageName); 

Mistake

 Warning: move_uploaded_file(/images/goods/2013_3.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpQAmkg5' to '/images/goods/2013_3.jpg' in 

$ _FILES content

 array(2) { ["goodsImage"]=> array(5) { ["name"]=> string(5) "3.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(14) "/tmp/phpQAmkg5" ["error"]=> int(0) ["size"]=> int(32111) } ["goodsImageNew"]=> array(5) { ["name"]=> string(5) "4.jpg" ["type"]=> string(10) "image/jpeg" ["tmp_name"]=> string(14) "/tmp/phprgw9UP" ["error"]=> int(0) ["size"]=> int(48431) } } 
  • it seems everything is clearly written? do you have a path /images/goods/ writable? I doubt something. Add to the destination path the full path to the site folder. - teran
  • I set 777 everywhere, and the path is full - no effect. - votanko
  • Is there such a way? - Alexey Shatrov
  • Yes, $ kernelVars ['goodsDir']. $ imageName = "/var/www/example.com/images/goods/" - Do you have enough rights to write for images and goods? - votanko
  • You also wrote that there is no path /images/goods/ where you are trying to write the file, and you write about /var/www/example.com/images/goods you realize that these are different ways at all? - teran

0