Problem installing xibo-cms-3.0.0

Hello.

There is a problem installing xibo-cms-3.0.0

CMS Version 3.0.0 a3465f2

Custom install

Windows 10, wampserver 3.2.3

I did everything as usual. I unpacked the archive, set up the domain, and uploaded it to the desired folder. When entering the domain, it is redirected to step 1 (/install/1), where the following error occurs

# Slim Application Error
The application could not run because of the following error:
## Details
**Type:** Error
**Code:** 0
**Message:** Call to a member function getContainer() on string
**File:** C:\wamp\www\xibo\lib\Middleware\Theme.php
**Line:** 66
## Trace
#0 C:\wamp\www\xibo\vendor\slim\slim\Slim\MiddlewareDispatcher.php(147): Xibo\Middleware\Theme->process(Object(Slim\Http\ServerRequest), Object(Slim\Routing\RouteRunner)) #1 C:\wamp\www\xibo\vendor\slim\twig-view\src\TwigMiddleware.php(125): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #2 C:\wamp\www\xibo\vendor\slim\slim\Slim\MiddlewareDispatcher.php(147): Slim\Views\TwigMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #3 C:\wamp\www\xibo\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php(59): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #4 C:\wamp\www\xibo\vendor\slim\slim\Slim\MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #5 C:\wamp\www\xibo\vendor\slim\slim\Slim\Middleware\ErrorMiddleware.php(107): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #6 C:\wamp\www\xibo\vendor\slim\slim\Slim\MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(class@anonymous)) #7 C:\wamp\www\xibo\vendor\slim\slim\Slim\MiddlewareDispatcher.php(81): class@anonymous->handle(Object(Slim\Http\ServerRequest)) #8 C:\wamp\www\xibo\vendor\slim\slim\Slim\App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest)) #9 C:\wamp\www\xibo\vendor\slim\slim\Slim\App.php(199): Slim\App->handle(Object(Slim\Http\ServerRequest)) #10 C:\wamp\www\xibo\web\install\index.php(95): Slim\App->run() #11 {main}

\lib\Middleware\Theme.php

$app is string ‘default’ on line 66 and does not contain functions

Hello and welcome to the Community.

I have passed this to our development team who will investigate further. Here is a link to the reported issue:

Thank you

I tried another way - from sources. launched composer install, got:

Package emojione/emojione is abandoned, you should avoid using it. No replacement was suggested.
Package jeremeamia/superclosure is abandoned, you should avoid using it. Use opis/closure instead.
Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression instead.
Package zendframework/zendxml is abandoned, you should avoid using it. Use laminas/laminas-xml instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.

Then I tried to enter the install again. Errors got similar to the case above

Please bear with us, we’re working on the manual installer and will update the release files when we have a solution for that.

No need to pull from source - it will be harder for you to build the dependencies, and that still won’t fix the manual installer.

1 Like

We’ve finished updating the release archive, if you’d like to download that and give it another go please :pray:

Thank you!

1 Like

Thank you.
Installation was successful, I have been using the base since version 2.3.10, but …

There is a problem with the library (/ library / view). Unable to download files, files downloaded are empty.

Likewise, in the Layouts section, it is not possible to preview the layout. Videos do not load, black screen

That is interesting, we can’t recreate that issue - please can you get us some logging when you try to download a file?

There are no errors in the log file.

Perhaps the following will help you figure it out.

The controller \ lib \ Controller \ Library.php is responsible for downloading.
On line 1542 I write “var_dump ($ response); exit;”
I get an object on the entrance:

\lib\Controller\Library.php:1542:
object(Slim\Http\Response)[4262]
protected ‘response’ =>
object(Nyholm\Psr7\Response)[4265]
private ‘reasonPhrase’ => string ‘’ (length=0)
private ‘statusCode’ => int 200
private ‘headers’ =>
array (size=7)
‘ETag’ =>
array (size=1)

‘Expires’ =>
array (size=1)

‘Content-Length’ =>
array (size=1)

‘Content-Type’ =>
array (size=1)

‘Content-Transfer-Encoding’ =>
array (size=1)

‘Content-disposition’ =>
array (size=1)

‘X-Sendfile’ =>
array (size=1)

private ‘headerNames’ =>
array (size=7)
‘etag’ => string ‘ETag’ (length=4)
‘expires’ => string ‘Expires’ (length=7)
‘content-length’ => string ‘Content-Length’ (length=14)
‘content-type’ => string ‘Content-Type’ (length=12)
‘content-transfer-encoding’ => string ‘Content-Transfer-Encoding’ (length=25)
‘content-disposition’ => string ‘Content-disposition’ (length=19)
‘x-sendfile’ => string ‘X-Sendfile’ (length=10)
private ‘protocol’ => string ‘1.1’ (length=3)
private ‘stream’ => null
protected ‘streamFactory’ =>
object(Nyholm\Psr7\Factory\Psr17Factory)[134]

if I write print_r ($ response); exit;
get the server response

Slim\Http\Response Object ( [response:protected] => Nyholm\Psr7\Response Object ( [reasonPhrase:Nyholm\Psr7\Response:private] => [statusCode:Nyholm\Psr7\Response:private] => 200 [headers:Nyholm\Psr7\Response:private] => Array ( [ETag] => Array ( [0] => “7f08034f233694cba66358ae69fb67af” ) [Expires] => Array ( [0] => Fri, 02 Jul 2021 09:27:01 GMT ) [Content-Length] => Array ( [0] => 2050928 ) [Content-Type] => Array ( [0] => application/octet-stream ) [Content-Transfer-Encoding] => Array ( [0] => Binary ) [Content-disposition] => Array ( [0] => attachment; filename=“768х384.mp4” ) [X-Sendfile] => Array ( [0] => C:\wamp\www\xibo\library\1368.mp4 ) ) [headerNames:Nyholm\Psr7\Response:private] => Array ( [etag] => ETag [expires] => Expires [content-length] => Content-Length [content-type] => Content-Type [content-transfer-encoding] => Content-Transfer-Encoding [content-disposition] => Content-disposition [x-sendfile] => X-Sendfile ) [protocol:Nyholm\Psr7\Response:private] => 1.1 [stream:Nyholm\Psr7\Response:private] => ) [streamFactory:protected] => Nyholm\Psr7\Factory\Psr17Factory Object ( ) )

It looks like you have sendfile enabled, which is where we use nginx or apache to deliver library file content over HTTP instead of via PHP.

Have you configured sendfile in your web server?

I would first try turning sendfile off in the CMS settings to see if that helps.

The settings say SENDFILE_MODE = Apache
I change the setting to SENDFILE_MODE = off

It brought no change

Is that path correct for your install and does that file exist?

Yes, the right path.
The file exists at the given address.
Moreover, its size is deduced from \ xibo \ lib \ Widget \ ModuleWidget.php line 1155

Did you change this setting through the User Interface, because they are cached and changing them in the database won’t immediately apply the change?

Yes, I changed the parameter in the database. I didn’t find it in the interface settings.

I am fairly sure that the problem downloading files is because you have Sendfile set to Apache and have not actually configured Apache for sendfile mode. Changing the setting directly in the database will have no effect until the cache expires.

The setting is called “File download mode” and is on the General tab.

Thanks

I installed two versions on the same server on different domains - 3.0.0 and 2.2.2.

The bases were initially the same.

On the old version there was an Apache setting and everything works there
(used xsendfile_module,
LIBRARY_LOCATION = “…/library/” … when using the full path, an empty file was also uploaded).

In version 3, I changed the parameter through the settings, it did not help.
And I guess problems might be on path LIBRARY_LOCATION.
It is suitable for generating headers, but does not receive data for uploading to a stream.

I’m sorry, I am not an expert in Windows or wampserver so I am at the limit of my knowledge here. If sendfile is off, then Xibo just serves the file path as a stream:

$response = $response->withBody(new Stream(fopen($libraryPath, 'r')));

Where the library path is the setting + the file name on disk. I do not think a relative path will work properly.

If you put your server into Test mode, you could try adding some logging to ModuleWidget.php where the download() happens, particularly you could log $libraryPath to see whether it is as you expect or not.

1 Like

Thank you for your help. The problem is gone.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.