XF 2.3 Attachment Optimization Failure

PatMa

Active member
Licensed customer
Any ideas on this one ?
Running the Optimize Attachments after switching to webp, it ran for hours - which is fine.
Then this happened, and I can't figure out what it is doing? Or where it wants to do it?
I touched/created a file from config.php, so I know the server is running as my user -
there is a temp directory in forum/internal_data - since the error message truncates the name.

Also, php 8.1, as the forum fails when I change php versions. (which I need to figure out at some point)

This is from the error log

Code:
ErrorException: [E_NOTICE] tempnam(): file created in the system's temporary directory src/XF/Util/File.php:46
Generated by: Patrick Jun 12, 2026 at 9:18 AM
Stack trace
#0 [internal function]: XF::handlePhpError(8, '[E_NOTICE] temp...', '/home/os9oi9uwe...', 46)
#1 src/XF/Util/File.php(46): tempnam('/home/os9oi9uwe...', 'xf')
#2 src/XF/Util/File.php(190): XF\Util\File::getTempFile(true)
#3 src/XF/Util/File.php(202): XF\Util\File::copyStreamToTempFile(Resource id #288, true)
#4 src/XF/Service/Attachment/PreparerService.php(185): XF\Util\File::copyAbstractedPathToTempFile('internal-data:/...')
#5 src/XF/Job/AttachmentOptimization.php(32): XF\Service\Attachment\PreparerService->optimizeExistingAttachment(Object(XF\Entity\AttachmentData))
#6 src/XF/Job/AbstractImageOptimizationJob.php(27): XF\Job\AttachmentOptimization->optimizeById(26951)
#7 src/XF/Job/AbstractRebuildJob.php(65): XF\Job\AbstractImageOptimizationJob->rebuildById(26951)
#8 src/XF/Job/AbstractImageOptimizationJob.php(18): XF\Job\AbstractRebuildJob->run(8)
#9 src/XF/Job/Manager.php(275): XF\Job\AbstractImageOptimizationJob->run(8)
#10 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#11 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#12 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#13 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#15 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#16 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#18 src/XF.php(814): XF\App->run()
#19 admin.php(15): XF::runApp('XF\\Admin\\App')
#20 {main}

There is a note that there are manual jobs to finish
1781282146617.webp
This is what is returned when I try to re-run


1781282068226.webp

I'm going to guess that I should get the php thing figured? then see if it magically disappears?
when I change php versions I'm getting an uncaught error for mb_internal_encoding()
Maybe a missing package on the upgrade?

maybe I just need to "think by writing it down" ?? :D
 
Back
Top Bottom