Jalle19 / xbmc-video-server

Web interface for streaming or downloading media from a Kodi/XBMC library
GNU General Public License v3.0
191 stars 39 forks source link

/tmp not in open_basedir path(s) #276

Closed Fogelholk closed 8 years ago

Fogelholk commented 8 years ago

Hi, While trying to generate thumbnails xbmc-video-server fails because I have open_basedir activated in PHP.

I have set upload_tmp_dir to /www/tmp in my php.ini.

Error message below:

tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/www/tmp:/www/mydomain.com/public_html) (/www/mydomain.com/public_html/xbmc-video-server/src/protected/models/thumbnail/Thumbnail.php:111)

Stack trace:

#0 unknown(0): ThumbnailController->actionGenerate()

#1 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/actions/CAction.php(108): ReflectionMethod->invokeArgs()

#2 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()

#3 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams()

#4 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(133): ThumbnailController->runAction()

#5 /www/mydomain.com/public_html/xbmc-video-server/src/protected/controllers/base/Controller.php(65): CFilterChain->run()

#6 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58): ThumbnailController->filterReleaseSessionLock()

#7 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()

#8 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run()

#9 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/CController.php(265): ThumbnailController->runActionWithFilters()

#10 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): ThumbnailController->run()

#11 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()

#12 /www/mydomain.com/public_html/xbmc-video-server/vendor/yiisoft/yii/framework/base/CApplication.php(180): CWebApplication->processRequest()

#13 /www/mydomain.com/public_html/xbmc-video-server/src/index.php(21): CWebApplication->run()

REQUEST_URI=/xbmc-video-server/src/thumbnail/generate?path=image%3A%2F%2Fhttp%253a%252f%252fthetvdb.com%252fbanners%252fposters%252f275274-6.jpg%2F&size=160
Jalle19 commented 8 years ago

Can you try https://github.com/Jalle19/xbmc-video-server/commit/dcde662014f0d8dab2adf868815ec4de1a7b9844 ? Just run git checkout tempdir.

Fogelholk commented 8 years ago

Seems to be working! No error-messages and thumbnails are downloaded and generated :)

Jalle19 commented 8 years ago

Good, I'll merge that to master then, after that you can run git checkout master once, then it's business as usual.

Fogelholk commented 8 years ago

Awesome! Thanks for the quick help and clear instructions :)