We have several virtual servers utilizing Zend Framework 2. Suddenly, we are getting errors when the applications are trying to rename TMP files to their permanent locations.
Here is an example of the error messages:
Message:
File '/tmp/php4i88d1' could not be renamed. An error occurred while processing the file.
Stack trace:
#0 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/File/RenameUpload.php(194): Zend\Filter\File\RenameUpload->moveUploadedFile('/tmp/php4i88d1', 'public/uploads/...')
#1 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/AbstractFilter.php(89): Zend\Filter\File\RenameUpload->filter(Array)
#2 [internal function]: Zend\Filter\AbstractFilter->__invoke(Array)
#3 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/FilterChain.php(225): call_user_func(Object(Zend\Filter\File\RenameUpload), Array)
#4 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-inputfilter/src/FileInput.php(70): Zend\Filter\FilterChain->filter(Array)
#5 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-inputfilter/src/BaseInputFilter.php(406): Zend\InputFilter\FileInput->getValue()
#6 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-form/src/Form.php(355): Zend\InputFilter\BaseInputFilter->getValues()
#7 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-form/src/Form.php(516): Zend\Form\Form->bindValues()
#8 /part2/sites/beta-ppa2/ZendSkeletonApplication/module/Admin/src/Admin/Controller/TemplateController.php(193): Zend\Form\Form->isValid()
#9 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Admin\Controller\TemplateController->editTemplateAction()
#10 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#11 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#12 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#13 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#15 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#16 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#17 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#18 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#19 /part2/sites/beta-ppa2/ZendSkeletonApplication/public/index.php(23): Zend\Mvc\Application->run()
#20 {main}
Previous exceptions:
ErrorException
File:
/part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/File/RenameUpload.php:216
Message:
move_uploaded_file(): Unable to move '/tmp/php4i88d1' to 'public/uploads/templatedocumentmaster/11ff5789fdd6c52e860f2e12aba90c17.jpg'
Stack trace:
#0 [internal function]: Zend\Stdlib\ErrorHandler::addError(2, 'move_uploaded_f...', '/part2/sites/be...', 216, Array)
#1 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/File/RenameUpload.php(216): move_uploaded_file('/tmp/php4i88d1', 'public/uploads/...')
#2 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/File/RenameUpload.php(194): Zend\Filter\File\RenameUpload->moveUploadedFile('/tmp/php4i88d1', 'public/uploads/...')
#3 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/AbstractFilter.php(89): Zend\Filter\File\RenameUpload->filter(Array)
#4 [internal function]: Zend\Filter\AbstractFilter->__invoke(Array)
#5 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-filter/src/FilterChain.php(225): call_user_func(Object(Zend\Filter\File\RenameUpload), Array)
#6 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-inputfilter/src/FileInput.php(70): Zend\Filter\FilterChain->filter(Array)
#7 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-inputfilter/src/BaseInputFilter.php(406): Zend\InputFilter\FileInput->getValue()
#8 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-form/src/Form.php(355): Zend\InputFilter\BaseInputFilter->getValues()
#9 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-form/src/Form.php(516): Zend\Form\Form->bindValues()
#10 /part2/sites/beta-ppa2/ZendSkeletonApplication/module/Admin/src/Admin/Controller/TemplateController.php(193): Zend\Form\Form->isValid()
#11 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Admin\Controller\TemplateController->editTemplateAction()
#12 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#17 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#18 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#19 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /part2/sites/beta-ppa2/ZendSkeletonApplication/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#21 /part2/sites/beta-ppa2/ZendSkeletonApplication/public/index.php(23): Zend\Mvc\Application->run()
#22 {main}
Any ideas on why this would suddenly happen? We have had no updates to binaries or server files for more than two days - and these two SEPARATE applications were working fine since that time. They are on the same server, but separate apps.
These are sites on AWS servers running Amazon linux ami's. And it should be noted that these same applications are working fine on the development servers. This is only occurring on the production server. Both the TMP directory and the destination directory have full permissions and proper ownership - nothing was changed there for months.
Thanks, in advance, for help!