Error while try to run xmr.phar - xibo v4 (Windows Manual Installation)

CMS Version

CMS 4.0.0-beta released

Installation Method

Custom install

Operating System

Windows 11

Issue

I’m trying to install cms v4 beta. Not sure if the problem is caused by misconfiguration.
My installation is as below:

  1. Apache httpd-2.4.57-win64-VS16
  2. Mysql-8.0.34-winx64
  3. php-8.1.17-Win32-vs16-x64 (also tried with php-8.1.20-Win32-vs16-x64, php-8.2.7-Win32-vs16-x64, and php-8.1.0-Win32-vs16-x64)
  4. php-zmq release from → Release zmq 4.3.4 - prebuilt Windows php extension binaries · stijnvdb88/php-zmq · GitHub

No problem with CMS logon, API request and I’m able to load zmq extension in php, but when I try to run “php xmr.phar” in command prompt, there was an error:

Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/index.php on line 204

Any idea what might be the cause?

I am able to run xmr.phar by using php 7. Assuming xmr.phar are not built for php 8. Only the CMS requirement is php 8. :smiling_face_with_tear:

Ah interesting! We have updated XMR for PHP 8.1, but it looks like we didn’t rebuild the PHAR file. I’ll see if we can get that updated for you.

EDIT: you could try grabbing xmr.phar from here: https://github.com/xibosignage/xibo-xmr/raw/87d1540d3cb73f6ef55287b4dcb666d5692c11d2/bin/xmr.phar

Actually I also tried to extract the phar file and modify the php code in index.php, then rebuilt the phar file again. Unparenthesized problem solved, but another error cause by deprecated monolog code appears. Looking forward for updated phar file from your team. Thanks Dan…

Is that using the PHAR I linked above? If yes, what are the monolog errors please?

I tried to replace phar file from the link above. Got a new error

PHP Fatal error:  Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, bool given in phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Terminal.php:60
Stack trace:
#0 phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Terminal.php(60): trim(false)
#1 phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Terminal.php(31): HumbugBox436\KevinGH\RequirementChecker\Terminal::initDimensions()
#2 phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Printer.php(28): HumbugBox436\KevinGH\RequirementChecker\Terminal->getWidth()
#3 phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Checker.php(17): HumbugBox436\KevinGH\RequirementChecker\Printer->__construct(32, true)
#4 phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/bin/check-requirements.php(22): HumbugBox436\KevinGH\RequirementChecker\Checker::checkRequirements()
#5 C:\Server\www\xibo\vendor\xibosignage\xibo-xmr\bin\xmr.phar(12): require('phar://C:/Serve...')
#6 C:\Server\www\xibo\vendor\bin\xmr.phar(119): include('C:\\Server\\www\\x...')
#7 {main}
  thrown in phar://C:/Server/www/xibo/vendor/xibosignage/xibo-xmr/bin/xmr.phar/.box/src/Terminal.php on line 60

Ah ok, that looks like a know issue in the PHAR packager

The suggestion is that we revert back to 4.2.0, so I have tried that:

https://github.com/xibosignage/xibo-xmr/raw/df815b1d629f0cb4479ea59f5a0487249b1cd3f6/bin/xmr.phar

Sorry for the trial and error - I don’t have a windows PHP installation to try it on.

Now it works ! Thanks Dan

1 Like

Fantastic, thanks for confirming! We will get that released with the rc1 coming soon.

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