MG 2.2 open_basedir restriction error

hollosch

Active member
Changing the style (Themhouse style) for XFMG following error occurs:
  • ErrorException: [E_WARNING] file_exists(): open_basedir restriction in effect. File(/usr/bin/ffmpeg) is not within the allowed path(s): (/data/vhosts/domain.com/:/tmp/)
  • src/addons/XFMG/Validator/Ffmpeg.php:20
  • Generiert von: hollosch
  • 29. Oktober 2021 um 12:59

Stack-Trace​

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fil...', '/data/vhosts/st...', 20)
#1 src/addons/XFMG/Validator/Ffmpeg.php(20): file_exists('/usr/bin/ffmpeg')
#2 src/addons/XFMG/Option/Ffmpeg.php(25): XFMG\Validator\Ffmpeg->isValid('/usr/bin/ffmpeg', NULL)
#3 src/XF/Entity/Option.php(208): XFMG\Option\Ffmpeg::verifyOption(Array, Object(vw\vw\XF\Entity\Option), 'xfmgFfmpeg')
#4 src/addons/vw/vw/XF/Entity/Option.php(42): XF\Entity\Option->verifyOptionValue(Array)
#5 src/XF/Mvc/Entity/Entity.php(789): vw\vw\XF\Entity\Option->verifyOptionValue(Array, 'option_value', 6, Array)
#6 src/XF/Mvc/Entity/Entity.php(634): XF\Mvc\Entity\Entity->_verifyValueCustom(Array, 'option_value', 6, Array)
#7 src/XF/Mvc/Entity/Entity.php(569): XF\Mvc\Entity\Entity->set('option_value', Array)
#8 src/XF/Repository/Option.php(113): XF\Mvc\Entity\Entity->__set('option_value', Array)
#9 src/addons/vw/vw/XF/Repository/Option.php(68): XF\Repository\Option->updateOptions(Array)
#10 src/XF/Admin/Controller/Option.php(84): vw\vw\XF\Repository\Option->updateOptions(Array)
#11 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Option->actionUpdate(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Option', 'Update', Object(XF\Mvc\RouteMatch), Object(XFA\Core\XF\Admin\Controller\Option), NULL)
#13 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFA\Core\XF\Admin\Controller\Option), NULL)
#14 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#16 src/XF.php(512): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}

Status der Anfrage​

array(4) {
["url"] => string(25) "/admin.php?options/update"
["referrer"] => string(62) "https://domain.com/admin.php?add-ons/XFMG/options"
["_GET"] => array(1) {
["options/update"] => string(0) ""
}
["_POST"] => array(6) {
["options"] => array(17) {
["xfmgLightboxNavigation"] => string(1) "1"
["xfmgThumbnailDimensions"] => array(2) {
["width"] => string(3) "300"
["height"] => string(3) "300"
}
["xfmgMaxTitleLength"] => string(3) "150"
["xfmgMaxDescriptionLength"] => string(4) "5000"
["xfmgAllowPersonalAlbums"] => string(1) "1"
["xfmgDefaultViewPrivacy"] => string(6) "public"
["xfmgMinTagsPersonalAlbums"] => string(1) "0"
["xfmgOverrideStyle"] => string(2) "62"
["xfmgMediaIndexLimit"] => string(1) "0"
["xfmgImageExtensions"] => string(24) "png
jpg
jpeg
jpe
gif"
["xfmgWatermarking"] => array(1) {
["watermark_hash"] => string(32) "a1278cb7a1172111779af2dc1f211088"
}
["xfmgVideoExtensions"] => string(34) "avi
m4v
mov
 

Kirby

Well-known member

Chris D

XenForo developer
Staff member
There is nothing here to indicate it is anything to do with changing your style. In fact, it was generated when you attempted to save XFMG options, which includes the FFmpeg path.

When verifying the FFmpeg path we attempt to access FFmpeg in order to ensure it's a valid FFmpeg executable.

In your particular case your host has enforced open_basedir restrictions which means that FFmpeg cannot be executed in the path in which it is stored.

This isn't a bug. It is a server configuration issue. Your host will either need to change the open_basedir directive to include FFmpeg or move FFmpeg to somewhere it can be accessed by your configuration.
 

hollosch

Active member
There is nothing here to indicate it is anything to do with changing your style. In fact, it was generated when you attempted to save XFMG options, which includes the FFmpeg path.

When verifying the FFmpeg path we attempt to access FFmpeg in order to ensure it's a valid FFmpeg executable.

In your particular case your host has enforced open_basedir restrictions which means that FFmpeg cannot be executed in the path in which it is stored.

This isn't a bug. It is a server configuration issue. Your host will either need to change the open_basedir directive to include FFmpeg or move FFmpeg to somewhere it can be accessed by your configuration.

Ok, i will have a look to this. thanks.
 
Top