1.8 Alpha3 Composer Causing Errors

We were attempting to remote upgrade an Android client with Alpha3 and ran into an error. I think we did not run composer after the full re-install of the alpha 3. So I ran composer and then attempted to access the CMS again. When I did I ran into this:

The www.xxxxxxx.com page isn’t working

www.xxxxxxx.com is currently unable to handle this request.
HTTP ERROR 500

Apache Access log shows:

> 127.0.0.1 - - [07/May/2016:15:34:11 -0700] "GET /xibo18alpha/web/clock?_=1462660331252 HTTP/1.1" 500 -
> 127.0.0.1 - - [07/May/2016:15:34:51 -0700] "GET /xibo18alpha/web/login HTTP/1.1" 500 -

Looks like trouble finding /xibo18alpha/web/clock and /xibo18alpha/web/login

More interesting was the line right above it, in the log before running composer:
127.0.0.1 - - [07/May/2016:15:33:11 -0700] "GET /xibo18alpha/web/clock?_=1462660331251 HTTP/1.1" 200 194

That is you masking out your domain, right?

How did you update composer? composer install --no-dev ?

Yes I masked out the domain.

Updated composer with composer self-update and then composer install

Should I be doing it with composer install --no-dev?

It doesn’t really matter - it just reduces the number of packages it pulls in.

If you did “install” rather than “update” then I don’t see how running that would effect the site in such a way. Can you switch into test mode and see if there are further errors logged?

I can switch to test mode before running composer, but how do I get the log afterwards, as I can no longer log back in?

I guess I could then revert the vendor folder back and then go pull the logs.

You could add a file log and use that - in settings.php:

$logHandlers = [new \Monolog\Handler\StreamHandler(PROJECT_ROOT . '/log.txt')];

Log:

[2016-05-09 13:18:51] WEB.DEBUG: New Player Action Service from DI [] {"uid":"ba0fa69","method":"GET","route":"/clock","userId":null}
[2016-05-09 13:18:51] WEB.INFO: PDO stats: {"connections":3,"selects":0,"inserts":0,"updates":0}. [] {"uid":"ba0fa69","method":"GET","route":"/clock","userId":null}
[2016-05-09 13:18:51] WEB.DEBUG: SET @session_id='gbsnptkmkdcsruk6immsg2dbv6'; SET @session_data='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_data2='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_expiration='1462826931'; SET @session_expiration2='1462826750'; SET @lastAccessed='2016-05-09 13:18:51'; SET @lastAccessed2='2016-05-09 13:18:51'; SET @userId='1'; SET @userId2='1'; SET @expired='1'; SET @expired2='1'; SET @useragent='Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36'; SET @remoteaddr='127.0.0.1';                    INSERT INTO `session` (session_id, session_data, session_expiration, lastaccessed, userid, isexpired, useragent, remoteaddr)                     VALUES (@session_id, @session_data, @session_expiration, @lastAccessed, @userId, @expired, @useragent, @remoteaddr)                     ON DUPLICATE KEY UPDATE                       `session_data` = @session_data2,                       `userId` = @userId2,                       `session_expiration` = @session_expiration2,                       `isExpired` = @expired2,                       `lastaccessed` = @lastAccessed2                  [] {"uid":"ba0fa69","method":"GET","route":"/clock","userId":null}
[2016-05-09 13:18:52] WEB.INFO: PDO stats: {"connections":3,"selects":0,"inserts":0,"updates":0}. [] {"uid":"05e0dcd","method":"GET","route":"/login/ping","userId":null}
[2016-05-09 13:18:52] WEB.DEBUG: New Player Action Service from DI [] {"uid":"05e0dcd","method":"GET","route":"/login/ping","userId":null}
[2016-05-09 13:18:52] WEB.DEBUG: SET @session_id='gbsnptkmkdcsruk6immsg2dbv6'; SET @session_data='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_data2='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_expiration='1462826932'; SET @session_expiration2='1462826932'; SET @lastAccessed='2016-05-09 13:18:52'; SET @lastAccessed2='2016-05-09 13:18:52'; SET @userId='1'; SET @userId2='1'; SET @expired='1'; SET @expired2='1'; SET @useragent='Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36'; SET @remoteaddr='127.0.0.1';                    INSERT INTO `session` (session_id, session_data, session_expiration, lastaccessed, userid, isexpired, useragent, remoteaddr)                     VALUES (@session_id, @session_data, @session_expiration, @lastAccessed, @userId, @expired, @useragent, @remoteaddr)                     ON DUPLICATE KEY UPDATE                       `session_data` = @session_data2,                       `userId` = @userId2,                       `session_expiration` = @session_expiration2,                       `isExpired` = @expired2,                       `lastaccessed` = @lastAccessed2                  [] {"uid":"05e0dcd","method":"GET","route":"/login/ping","userId":null}
[2016-05-09 13:18:52] WEB.DEBUG: New Player Action Service from DI [] {"uid":"e75f8ac","method":"GET","route":"/login","userId":null}
[2016-05-09 13:18:52] WEB.DEBUG: Array ( )  [] {"uid":"e75f8ac","method":"GET","route":"/login","userId":null}
[2016-05-09 13:18:52] WEB.INFO: PDO stats: {"connections":3,"selects":0,"inserts":0,"updates":0}. [] {"uid":"e75f8ac","method":"GET","route":"/login","userId":null}
[2016-05-09 13:18:52] WEB.DEBUG: SET @session_id='gbsnptkmkdcsruk6immsg2dbv6'; SET @session_data='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_data2='init|s:1:"1";csrfToken|s:40:"5f1709c749d2e86808e359d831ffb951ff59e066";slim.flash|a:0:{}userid|i:1;displayGroupIds|a:1:{i:0;i:3;}'; SET @session_expiration='1462826932'; SET @session_expiration2='1462826932'; SET @lastAccessed='2016-05-09 13:18:52'; SET @lastAccessed2='2016-05-09 13:18:52'; SET @userId='1'; SET @userId2='1'; SET @expired='1'; SET @expired2='1'; SET @useragent='Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36'; SET @remoteaddr='127.0.0.1';                    INSERT INTO `session` (session_id, session_data, session_expiration, lastaccessed, userid, isexpired, useragent, remoteaddr)                     VALUES (@session_id, @session_data, @session_expiration, @lastAccessed, @userId, @expired, @useragent, @remoteaddr)                     ON DUPLICATE KEY UPDATE                       `session_data` = @session_data2,                       `userId` = @userId2,                       `session_expiration` = @session_expiration2,                       `isExpired` = @expired2,                       `lastaccessed` = @lastAccessed2                  [] {"uid":"e75f8ac","method":"GET","route":"/login","userId":null}

Hmm, nothing useful really - that is in test mode?

Yes. (20 Characters)

Can you edit the top of /web/index.php and change:

error_reporting(0);
ini_set('display_errors', 0);

to

error_reporting(E_ALL);
ini_set('display_errors', 1);

I don’t have a log but I do have an error:

Fatal error: Class ‘RKA\Slim’ not found in C:\wamp\www\xibo18alpha\web\index.php on line 57

I move things down a bit when I commented out the two lines in index.php and added the code you wanted. So I believe line 57 should be line 54 in the original code.

That is very strange - RKA\Slim is a library that should be pulled in by composer - so it does appear to be a problem with that process.

Line 11 of your composer.lock file should contain those package details? This is the package: https://packagist.org/packages/akrabat/rka-slim-controller and in the repository: https://github.com/xibosignage/xibo-cms/blob/develop/composer.lock#L11

Perhaps there was a temporary problem with composer and running the statement again will fix it?

I think that the problem is/was the lock file included in Alpha3. My lock file looks totally different.

I copied the one in the link above and re-ran composer install, and all is well.

Thank you Dan.

1 Like