• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Unable to upload avatars - getimagesize error


I recently switched to a VPS server and since then new users are not able to upload avatars. The upload automatically results in a broken avatar.

This is the server error generated:

ErrorException: getimagesize(/data/avatars/l/0/440.jpg): failed to open stream: No such file or directory - library/XenForo/Model/Avatar.php:252

[internal function]: XenForo_Application::handlePhpError(2, 'getimagesize(/h...', '/folder-name/...', 252, Array)
#1 /library/XenForo/Model/Avatar.php(252): getimagesize('/folder-name/...')
#2 /library/XenForo/ControllerPublic/Account.php(577): XenForo_Model_Avatar->recropAvatar(440, 0, 0)
#3 /library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Account->actionAvatarUpload()
#4 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /index.php(13): XenForo_FrontController->run()
#6 {main}
I checked file permissions and things seem to be in order. The following are the current file permissions:

/data/ - 0777
/avatars/ - 0755
/I/ - 0755
/m/ - 0755
/s/ - 0755

I am currently using PHP GD image library to process data.

I contacted my host and they said that PHP GD image library is installed. They also said the following:

"This issue is created due to a conflict in the way that dso (your current php handler) and WordPress handle file permissions. This issue can be resolved by changing your current php handler to suphp and updating the sites file ownership and permissions accordingly. "

Should I go ahead and ask them to change the PHP handler to 'suphp'? Will that resolve the issue? If not, is there anything else that can be done? Thanks!