Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMR: the PHAR file with 1.0 release is an older version #3604

Open
dasgarner opened this issue Feb 19, 2025 · 5 comments
Open

XMR: the PHAR file with 1.0 release is an older version #3604

dasgarner opened this issue Feb 19, 2025 · 5 comments
Assignees

Comments

@dasgarner
Copy link
Member

Originally this was raised by the community: https://community.xibo.org.uk/t/websockets-configuration-in-4-2/34358/13

Upon investigation the build.sh file should have been run and the PHAR file updated in the repository before cutting a release. Unfortunately build.sh does not work anymore - likely due to PHP version.

Ideally the PHAR file should be removed from the repository, built and uploaded to the release via GitHub actions. Or, I suppose built using Docker so that it is available inside the image, and then uploaded to the release as an asset.

@PMGZED
Copy link

PMGZED commented Feb 20, 2025

i have compile from the tutorial from https://community.xibo.org.uk/t/websockets-configuration-in-4-2/34358/14
i have download https://github.com/box-project/box/releases/download/4.2.0/box.phar and build with php box.phar compile

but the vendor folder is missing. So i downloadet the release https://github.com/xibosignage/xibo-xmr/releases/tag/1.0 and replace the xmr.phar with my compiled file (in the zip archive the vendor folder is available.) and add the bin/config.json file.
but i have to run the file from the base folder not the bin subfolder like php ./bin/xmr.phar

that work for me.
the output shows not that port 8081 is opend but the service run and work netstat shows 8081 is open. so i think the log is not writing that its open.

root@debian:/xibo/xibo-xmr# php bin/xmr.phar
[2025-02-20 07:07:48] xmr.INFO: HTTP listening [] []
[2025-02-20 07:07:48] xmr.INFO: WS listening on 0.0.0.0:8080 [] []
[2025-02-20 07:07:48] xmr.INFO: Legacy: handling old messages [] []
[2025-02-20 07:07:48] xmr.INFO: Bind to tcp://0.0.0.0:9505 for Publish. [] []
[2025-02-20 07:07:48] xmr.DEBUG: Adding a queue processor for every 5 seconds []

@dasgarner
Copy link
Member Author

You're right, the HTTP server doesn't log its port in this line

[2025-02-20 07:07:48] xmr.INFO: HTTP listening [] []

But it will be open if that line is logged.

When I try to run box.phar on my side, it breaks and won't complete. We need a build process for it I think.

@PMGZED
Copy link

PMGZED commented Feb 20, 2025

What is the error message?
i have test on a second system and it runs.
i test it on
Debian bookworm and PHP 8.2.26 (cli)
Ubuntu 24.04.1 LTS and PHP 8.3.6 (cli)

@dasgarner
Copy link
Member Author

Sorry, I mean I get an error building the PHAR file via Box.

Your workaround above works fine in the meantime! Thanks

@PMGZED
Copy link

PMGZED commented Feb 20, 2025

Yes the building with box work on my system

root@debian:/xibo/tmp/xibo-xmr-git# php box.phar compile

    ____
   / __ )____  _  __
  / __  / __ \| |/_/
 / /_/ / /_/ />  <
/_____/\____/_/|_|


Box version 4.2.0@afc3a47 2022-11-21 22:20:19 UTC

 // Loading the configuration file "/xibo/tmp/xibo-xmr-git/box.json".

🔨  Building the PHAR "/xibo/tmp/xibo-xmr-git/bin/xmr.phar"

? Removing the existing PHAR "/xibo/tmp/xibo-xmr-git/bin/xmr.phar"
? No compactor to register
? Adding main file: /xibo/tmp/xibo-xmr-git/index.php
? Adding requirements checker
? Adding binary files
    > No file found
? Auto-discover files? No
? Exclude dev files? No
? Adding files
    > 3 file(s)
? Generating new stub
  - Using shebang line: #!/usr/bin/env php
  - Using banner:
    > Generated by Humbug Box 4.2.0@afc3a47.
    >
    > @link https://github.com/humbug/box
? Skipping dumping the Composer autoloader
? Removing the Composer dump artefacts
? No compression
? Setting file permissions to 0755
* Done.

💡  2 recommendations found:
    - The "stub" setting can be omitted since is set to its default value
    - The "chmod" setting can be omitted since is set to its default value
No warning found.

 // PHAR: 36 files (162.88KB)
 // You can inspect the generated PHAR with the "info" command.

 // Memory usage: 12.94MB (peak: 13.05MB), time: <1sec

@dasgarner dasgarner self-assigned this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants