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

Various updates to make the app run on PHP 8.x #336

Closed Jalle19 closed 1 year ago

Jalle19 commented 1 year ago

@alanmilinovic can you test this branch?

alanmilinovic commented 1 year ago

@alanmilinovic can you test this branch?

Hm, I got to the login page and after login I am getting error 500.

alanmilinovic commented 1 year ago

I did a fresh new installation and restored:

\var\www\html\xbmc-video-server\src\protected\data\xbmc-video-server.db
Jalle19 commented 1 year ago

Do you have any additional details about the HTTP 500 error? You can check the application log for more information.

alanmilinovic commented 1 year ago

Do you have any additional details about the HTTP 500 error? You can check the application log for more information.

Where is the log file located?

alanmilinovic commented 1 year ago

If you mean on application log webpage, it is all empty, only information about logged in and logged out.

Jalle19 commented 1 year ago

If you mean on application log webpage, it is all empty, only information about logged in and logged out.

That's the one I was thinking of.

But all in all, does the application work for you now with this branch?

alanmilinovic commented 1 year ago

If you mean on application log webpage, it is all empty, only information about logged in and logged out.

That's the one I was thinking of.

But all in all, does the application work for you now with this branch?

I can open application related pages like Settings, Log, Backend management, but main pages like browse Movies or TV Shows are not working and returning internal server error or error 500.

Jalle19 commented 1 year ago

Can you see if you have an error log in /var/log/apache2?

alanmilinovic commented 1 year ago

Can you see if you have an error log in /var/log/apache2?

Nothing usefull.

192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /xbmc-video-server2 HTTP/1.1" 301 625 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /xbmc-video-server2/ HTTP/1.1" 302 447 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /xbmc-video-server2/src/site/login HTTP/1.1" 200 993 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /xbmc-video-server2/src/css/login-min.css?1691738223 HTTP/1.1" 200 22755 "http://192.168.188.203:20530/xbmc-video-server2/src/site/login" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /fonts/lato/lato-v14-latin-700.woff2 HTTP/1.1" 404 496 "http://192.168.188.203:20530/xbmc-video-server2/src/css/login-min.css?1691738223" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /fonts/lato/lato-v14-latin-regular.woff2 HTTP/1.1" 404 497 "http://192.168.188.203:20530/xbmc-video-server2/src/css/login-min.css?1691738223" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /fonts/lato/lato-v14-latin-700.woff HTTP/1.1" 404 496 "http://192.168.188.203:20530/xbmc-video-server2/src/css/login-min.css?1691738223" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /fonts/lato/lato-v14-latin-regular.woff HTTP/1.1" 404 496 "http://192.168.188.203:20530/xbmc-video-server2/src/css/login-min.css?1691738223" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:52 +0200] "GET /favicon.ico HTTP/1.1" 404 496 "http://192.168.188.203:20530/xbmc-video-server2/src/site/login" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:54 +0200] "POST /xbmc-video-server2/src/site/login HTTP/1.1" 302 456 "http://192.168.188.203:20530/xbmc-video-server2/src/site/login" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36" 192.168.188.143 - - [11/Aug/2023:18:09:54 +0200] "GET /xbmc-video-server2/src/movie/recentlyAdded HTTP/1.1" 500 295 "http://192.168.188.203:20530/xbmc-video-server2/src/site/login" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36"

Jalle19 commented 1 year ago

I'll have to install PHP 8 myself and have a look

alanmilinovic commented 1 year ago

I'll have to install PHP 8 myself and have a look

I agree, then you can debug it.

Jalle19 commented 1 year ago

Pushed some fixes, still a bit work in progress

alanmilinovic commented 1 year ago

Pushed some fixes, still a bit work in progress

Main pages are working now, only images for movies and tv shows are not displayed. It is just an empty white space for cover.

alanmilinovic commented 1 year ago

Here is the error that I see in log.

`Imagine\Exception\RuntimeException: Gd not installed in /var/www/html/xbmc-video-server2/vendor/imagine/imagine/lib/Imagine/Gd/Imagine.php:172

Stack trace:

0 /var/www/html/xbmc-video-server2/vendor/imagine/imagine/lib/Imagine/Gd/Imagine.php(39): Imagine\Gd\Imagine->loadGdInfo()

1 /var/www/html/xbmc-video-server2/src/protected/models/thumbnail/Thumbnail.php(164): Imagine\Gd\Imagine->__construct()

2 /var/www/html/xbmc-video-server2/src/protected/models/thumbnail/Thumbnail.php(117): Thumbnail::imagineFactory()

3 /var/www/html/xbmc-video-server2/src/protected/controllers/ThumbnailController.php(36): Thumbnail->generate()

4 [internal function]: ThumbnailController->actionGenerate()

5 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs()

6 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal()

7 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams()

8 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(134): CController->runAction()

9 /var/www/html/xbmc-video-server2/src/protected/controllers/base/Controller.php(65): CFilterChain->run()

10 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58): Controller->filterReleaseSessionLock()

11 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()

12 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run()

13 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters()

14 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run()

15 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()

16 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()

17 /var/www/html/xbmc-video-server2/src/index.php(26): CApplication->run()

18 {main}

REQUEST_URI=/xbmc-video-server2/src/thumbnail/generate?path=image%3A%2F%2Fhttps%253a%252f%252fimage.tmdb.org%252ft%252fp%252foriginal%252fiMg0DeR8BtMtlfGBWgRm23xPpGO.jpg%2F&size=160

HTTP_REFERER=http://192.168.188.203:20530/xbmc-video-server2/src/movie/recentlyAdded

---`

alanmilinovic commented 1 year ago

install

After sudo apt-get install php8.2-gd I am getting different error: `Imagine\Exception\RuntimeException: Unable to open image /tmp/xbmc-video-server-thumbnailegTWnQ in /var/www/html/xbmc-video-server2/vendor/imagine/imagine/lib/Imagine/Gd/Imagine.php:96

Stack trace:

0 /var/www/html/xbmc-video-server2/src/protected/models/thumbnail/Thumbnail.php(119): Imagine\Gd\Imagine->open()

1 /var/www/html/xbmc-video-server2/src/protected/controllers/ThumbnailController.php(36): Thumbnail->generate()

2 [internal function]: ThumbnailController->actionGenerate()

3 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs()

4 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal()

5 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams()

6 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(134): CController->runAction()

7 /var/www/html/xbmc-video-server2/src/protected/controllers/base/Controller.php(65): CFilterChain->run()

8 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CInlineFilter.php(58): Controller->filterReleaseSessionLock()

9 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()

10 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(291): CFilterChain->run()

11 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters()

12 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run()

13 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()

14 /var/www/html/xbmc-video-server2/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()

15 /var/www/html/xbmc-video-server2/src/index.php(26): CApplication->run()

16 {main}

REQUEST_URI=/xbmc-video-server2/src/thumbnail/generate?path=image%3A%2F%2Fhttps%253a%252f%252fimage.tmdb.org%252ft%252fp%252foriginal%252f3B4MLYYr5WTjQiJMbA8fCFF8M4O.jpg%2F&size=160

HTTP_REFERER=http://192.168.188.203:20530/xbmc-video-server2/src/movie/recentlyAdded `

alanmilinovic commented 1 year ago

In developer tools I can see Internal server error 500 for thumbnails.

Jalle19 commented 1 year ago

Thumbnails worked fine for me in my Vagrant box, but I'll do some more testing

Jalle19 commented 1 year ago

Try removing GD and install Imagick instead

alanmilinovic commented 1 year ago

Try removing GD and install Imagick instead

Thanks, now it works with imagick.

alanmilinovic commented 1 year ago

Forgot to say, thank you very much for all the effort!