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

Won't fix Error related to the image proxy?

Stuart Wright

Well-known member
Server error new after upgrading to 1.3 RC 2:

ErrorException: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: File exists - library/XenForo/Helper/File.php:68
Generated By: Unknown Account, 19 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'mkdir() [<a hre...', '/home/sites/avf...', 68, Array)
#1 /home/sites/avforums/public_html/library/XenForo/Helper/File.php(68): mkdir('/home/sites/avf...')
#2 /home/sites/avforums/public_html/library/XenForo/Model/ImageProxy.php(308): XenForo_Helper_File::createDirectory('/home/sites/avf...', true)
#3 /home/sites/avforums/public_html/library/XenForo/Model/ImageProxy.php(31): XenForo_Model_ImageProxy->_fetchAndCacheImage('http://img408.i...')
#4 /home/sites/avforums/public_html/library/XenForo/ProxyOutput.php(197): XenForo_Model_ImageProxy->getImage('http://img408.i...')
#5 /home/sites/avforums/public_html/library/XenForo/ProxyOutput.php(129): XenForo_ProxyOutput->_outputImage(false)
#6 /home/sites/avforums/public_html/library/XenForo/ProxyOutput.php(341): XenForo_ProxyOutput->output()
#7 /home/sites/avforums/public_html/proxy.php(12): XenForo_ProxyOutput::run()
#8 {main}
Request State
array(3) {
["url"] => string(151) "http://www.avforums.com/proxy.php?i...cm3.jpg&hash=69b35cfacd57a2e597e3435d49eed54b"
["_GET"] => array(2) {
["image"] => string(61) "http://img408.imageshack.us/img408/705/dscf0037800x600cm3.jpg"
["hash"] => string(32) "69b35cfacd57a2e597e3435d49eed54b"
["_POST"] => array(0) {

Delete... Close

Chris D

XenForo developer
Staff member
It's worth noting also that generally the image proxying seems to be working fine.

I'm logged into their Admin CP at the moment, that error only appears once and otherwise so far the Image Proxy Log already contains nearly 20,000 items. Not bad for a couple of hours, eh?


XenForo developer
Staff member
So this is a race condition, but it's something we've attempted to shrink as much as possible:
if (!file_exists($partialPath) && !mkdir($partialPath))
The problem here is that I don't want to just silence the mkdir call, because we commonly get people with permission issues where this may fail and it's important for debugging.

This particular case is a situation where we don't care about the error - as long as the directory is created, that's all that's needed.

At this point, I'm going to say ignore it. If it happens with any frequency, we may need to consider how to handle it.