Romchik®
Well-known member
I'm not sure this is a bug in the XF or the server.
One user complains. He has in the error log:
Stack Trace
chmod - 777.
With attachments he did not have a problems or errors.
And this change fixes his problem.
library/XenForo/Model/Avatar.php:302 :
One user complains. He has in the error log:
Code:
rename(/***/forum/data/avatars/l/0/1.jpg) [<a href='function.rename'>function.rename</a>]: Operation not permitted
File: library/XenForo/Model/Avatar.php:302
Code:
#0 [internal function]: XenForo_Application::handlePhpError(2, 'rename(/var/tmp...', '/usr/home/pva...', 302, Array)
#1 /***/forum/library/XenForo/Model/Avatar.php(302): rename('/var/tmp/phpj2C...', '/usr/home/pva...')
#2 /***/forum/library/XenForo/Model/Avatar.php(189): XenForo_Model_Avatar->_writeAvatar(1, 'l', '/var/tmp/phpj2C...')
#3 /***/forum/library/XenForo/Model/Avatar.php(67): XenForo_Model_Avatar->applyAvatar(1, '/var/tmp/phpj2C...', 3, 152, 155, Array)
#4 /***/forum/library/XenForo/ControllerPublic/Account.php(482): XenForo_Model_Avatar->uploadAvatar(Object(XenForo_Upload), 1, Array)
#5 /***/forum/library/XenForo/FrontController.php(303): XenForo_ControllerPublic_Account->actionAvatarUpload()
#6 /***/forum/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /***/forum/index.php(15): XenForo_FrontController->run()
#8 {main}
With attachments he did not have a problems or errors.
And this change fixes his problem.
library/XenForo/Model/Avatar.php:302 :
PHP:
$success = rename($tempFile, $filePath);
>>>>>>>>
$success = @rename($tempFile, $filePath);