Issue with Xibo XMR Service after PHP upgrade

Hi,

We’ve been running Xibo 2.0.3 on a Windows-based Web Server for a while now and everything was working perfectly.

However, our Security Team has unfortunately noticed that the version of PHP we’re using is quite old and they’re pressing us to update it to improve the security of the system.

So, with this in mind i’ve tried to do an upgrade to version 7.0.8 of PHP which I believe should be supported with the version of Xibo we’re running.

It seems that the Xibo application itself is working fine, but when I came to try to remove the old version I found that the ‘Xibo XMR Service’ was still pointing to the old version. I tried up update this to point to the PHP.EXE for v7.0.8, but it seems there is some sort of issue launching the xmr.phar file with this version. When I try doing it from in a command prompt I get this:

C:\Program Files (x86)\PHP\v7.0.8>php d:\PHP_FILES\vendor\bin\xmr.phar [2020-03-25 00:38:57] xmr.INFO: Starting up - listening for CMS on tcp://127.0.0.1:50001. [] []

Running the same file using the old version yields this result:

[2020-03-25 00:46:42] xmr.INFO: Starting up - listening for CMS on tcp://127.0.0.1:50001. [] []
[2020-03-25 00:46:42] xmr.INFO: Bind to tcp://193.9.203.46:9505 for Publish. [] []
[2020-03-25 00:46:42] xmr.INFO: Bind to tcp://193.9.203.46:50002 for Publish. [] []
[2020-03-25 00:46:42] xmr.DEBUG: Adding a queue processor for every 5 seconds [] []

Is anyone able to provide any insight into why this issue might be happening? I found a github repo for the xmr.phar file, but it looks like i’m running the latest version (I downloaded it and used FC /B to compare and the files were identical).

Grateful for any suggestions.

Pete

Hi and welcome,

We have a newer release of XMR than the one in 2.0.3, which does bump the requirements to 7.0.8, see https://github.com/xibosignage/xibo-xmr/releases/tag/0.8

It might be worthwhile downloading and trying that.

FYI 2.2.1 was the first version which had a minimum PHP of 7.0.8, but you’re right 7 has been supported for a long while.

However all of that being said, it looks more like ZMQ isn’t available in your upgraded PHP install.

Thanks,
Dan

Thanks Dan. I actually tried doing an upgrade to a newer version of Xibo first but then I hit a different issue.

In that case I found that when I loaded a new version of Xibo Player and used the connect button I got an error. I had a bit of a dig into it and it looked like the system was throwing a SOAP error when the client was making a POST request to register the computer.

My ideal aim is to get both Xibo and PHP up to the most recent release possible, so i’m only too happy to have another go at the Xibo upgrade, and perhaps I can just post in here with the issues I hit to see if we can overcome them or get them logged as bugs in the git repo.

Thanks

Pete

Hi again,

I have downloaded version 2.3.2 of Xibo from the git repo and will give that another try.

Can you please confirm what the maximum supported version of PHP is please? And also, is it possible to get later versions of PHP that do support ZMQ?

Thanks

Pete

PHP 7.3.x is supported for Xibo 2.3.2.

ZeroMQ is an addon PHP module so you’d have to reinstall it and enable it for the version of PHP you’re using. It doesn’t ship as standard.

Thanks for the feedback guys.

I have just upraded to version 2.3.2 and have a couple of issues i’d appreciate help with.

  1. Post upgrade I find that all the graphs on the opening dashboard don’t render. If I click on ‘More Statistics’ in the Bandwidth Usage pane (top left) then another window opens where the graphs look ok.

  2. If I go to an instance of Xibo Player and click the connect button I get an error saying ‘syntax error, unexpected ‘?’’.

I can see from the IIS logs that the request being POSTed is this:

2020-03-27 13:01:46 x.x.x.x POST /xmds.php v=5&method=registerDisplay 80 - x.x.x.xx Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+4.0.30319.42000) - 500 0 0 140

And if I submit a similar request using Postman then I get this response back:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="">
SOAP-ENV:Body
SOAP-ENV:Fault
SOAP-ENV:Server
syntax error, unexpected ‘?’
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Before I did into it any further has anyone got any ideas as to what might be causing the problem?

Thanks in advance for any suggestions.

Pete

I’d check in the CMS on the Report Fault page first. You’re maybe missing something like the SOAP module from PHP.

On your browser issue, I’d try clearing your browser cache first.

Thanks Alex.

Right away the ‘Report Fault’ flags up the issue with only being on PHP 5.6.31 and the required is a minimum of 7.0.8. I’ll get the PHP upgraded over the weekend.

Pete

1 Like

Hi again,

Ok, so i’ve upgraded to the latest version of Xibo and have now also upgraded PHP to v7.0.8.

I am unfortunately still having issues with the Xibo XMR Service. I have modified the configuration to point to to new version of PHP but the service fails to start. If I try to run the PHAR file using this command:

“C:\Program Files (x86)\PHP\v7.0.8\php.exe” “D:\PHP_FILES\vendor\bin\xmr.phar”

Then I get this response:

[2020-03-30 13:24:52] xmr.INFO: Starting up - listening for CMS on tcp://127.0.0.1:50001. [] []

I have made sure that the previously used config.json is copied across but that doesn’t seem to have any impact. I have also made sure that the php_zmq.dll file got transferred over from the old version of PHP to the new one. The extension is also enabled in the PHP config.

Has anyone got any bright ideas please as to why the .phar file fails to launch fully?

Thanks

Pete

Ok, so I suspect this is the issue.

[30-Mar-2020 10:35:11 UTC] PHP Warning: PHP Startup: zmq: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20151012
These options need to match
in Unknown on line 0
[30-Mar-2020 13:35:11 Europe/Minsk] PHP Fatal error: Uncaught Error: Class ‘ZMQContext’ not found in phar://D:/PHP_FILES/vendor/bin/xmr.phar/vendor/react/zmq/src/React/ZMQ/Context.php:15
Stack trace:
#0 phar://D:/PHP_FILES/vendor/bin/xmr.phar/index.php(75): React\ZMQ\Context->__construct(Object(React\EventLoop\StreamSelectLoop))
#1 D:\PHP_FILES\vendor\bin\xmr.phar(10): require(‘phar://D:/PHP_F…’)
#2 {main}
thrown in phar://D:/PHP_FILES/vendor/bin/xmr.phar/vendor/react/zmq/src/React/ZMQ/Context.php on line 15

I had originally just copied the dll from the old version of PHP but maybe this isn’t possible.

I’ll continue trying to squash this error but if anyone has any help they can offer then i’d appreciate it.

Thanks

Pete

Found a version of php_zmq.dll that is file version 7.0.2. Put that in place and now get a different error.

[30-Mar-2020 10:43:45 UTC] PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\Program Files (x86)\PHP\v7.0.8\ext\php_zmq.dll’ - %1 is not a valid Win32 application.
in Unknown on line 0
[30-Mar-2020 13:43:45 Europe/Minsk] PHP Fatal error: Uncaught Error: Class ‘ZMQContext’ not found in phar://D:/PHP_FILES/vendor/bin/xmr.phar/vendor/react/zmq/src/React/ZMQ/Context.php:15
Stack trace:
#0 phar://D:/PHP_FILES/vendor/bin/xmr.phar/index.php(75): React\ZMQ\Context->__construct(Object(React\EventLoop\StreamSelectLoop))
#1 D:\PHP_FILES\vendor\bin\xmr.phar(10): require(‘phar://D:/PHP_F…’)
#2 {main}
thrown in phar://D:/PHP_FILES/vendor/bin/xmr.phar/vendor/react/zmq/src/React/ZMQ/Context.php on line 15

Aaaand, fixed. I’ll post the solution here just in case it helps anyone else.

I had to download the correct version of php_zmq.dll from here:

https://windows.php.net/downloads/pecl/releases/zmq/1.1.3/

In my case I needed the x86 non-thread safe version. As i’m using PHP 7.0.8 I grabbed the version with ‘1.1.3-7.0’ in the name.

The php_zmq.dll needed to go into the ext folder, but the other two DLL’s (libzmq and libsodium) had to go into the same directory as php.exe.

After I did that the Service started fine.

Pete

Ok, so we now have both Xibo and PHP up to a later revision.

Only issue still remaining is that the main dashboard still doesn’t function. I have tried the obvious stuff (clearing the browser cache, etc.) but still no luck.

Not only are the graphs missing but the count for things like the number of displays (top left) has a value of 0. The library size, uers and now showing values are all correct though. Using the report fault button causes the tests to be run, but they all come back as passing.

Any ideas please?

Thanks

Pete

Ok, so it’s fixed.

I used the option to enable debugging and spotted this in the resulting CSV:

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Fixed using this link:

Copied the pem to the Server and edited PHP.INI to point to it. All working again now :slight_smile:

2 Likes

Sorry for not following along with this - i’m really pleased you managed to get it solved.

The Xibo Community site uses cookies. What are cookies?