dunxd / HomeAssistantAddons

Home Assistant Addons developed by dunxd
4 stars 1 forks source link

Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP. #45

Closed vador31 closed 9 months ago

vador31 commented 9 months ago

Hello !

I can't access to the server : Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP. (on http://192.168.1.9:8000/index.php)

Log :

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
starting php server only
[Wed Feb 28 07:47:27 2024] PHP 8.2.16 Development Server (http://0.0.0.0:8000) started
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61835 Accepted
[Wed Feb 28 07:47:29 2024] PHP Fatal error:  Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP. in /cops/vendor/composer/platform_check.php on line 26
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61835 [500]: GET /index.php - Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP. in /cops/vendor/composer/platform_check.php on line 26
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61835 Closing
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61837 Accepted
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61837 [200]: GET /favicon.ico
[Wed Feb 28 07:47:29 2024] 192.168.1.17:61837 Closing

HAOS on RPI3 32 bits up to date.

Regards from France

dunxd commented 9 months ago

You are running the 32 bit version of your OS on the 64 bit capable Raspberry Pi. I'm surprised you aren't encountering issues with other apps. Do you have a strong reason for 32 bit?

I will take a look at the dependencies to see if this is an unnecessary check but it is quite likely that some of the libraries used in COPS require 64 bit PHP.

vador31 commented 9 months ago

Thank you for your fast answer !

The strong reason is that HAOS obviously runs on 32 bits :/ (or I've choosen the wrong version)

vador31 commented 9 months ago

I have no issue with others HA apps.

vador31 commented 9 months ago

New HAOS is 64 bits, not mine :/

mikespub commented 9 months ago

FYI, the 64 bit restriction comes from the maennchen/zipstream-php 3.x package for PHP 8.1+

That package is used by mikespub/php-epub-meta 2.x to update EPUB metadata on the fly for COPS 2.x (if configured), and it replaces the ancient TbsZip class from COPS 1.x

Besides the benefit of using a supported package for PHP 8.1+ to update metadata, it also supports ZIP64 which is used by modern EPUB editors.

All of which is why all 1.x versions are now in maintenance mode only, and only 2.x versions are actually being supported :-)

In theory, you could still create a 32 bit version for COPS 2.x by requiring mikespub/php-epub-meta 1.x instead of 2.x in composer.json, but that is only meant as a maintenance version for use with COPS 1.x - and I won't promise that the seblucas-cops 2.x + php-epub-meta 1.x combination will actually still work...

vador31 commented 9 months ago

OK I upgraded to HAOS 64 bits, PHP is OK but, after reconstruction, i still have : You've been redirected because COPS is not configured properly Database error

vador31 commented 9 months ago

Uninstall + reinstall : same database error.

vador31 commented 9 months ago

I have no metadata.db file, should it be created or can't I start from scratch ?

vador31 commented 9 months ago

OK, my fault : it's webserver, not Calibre... I uploaded metadata.db, everything is OK, thanx

dunxd commented 9 months ago

Glad it all worked out. Happy reading!

dunxd commented 9 months ago

@mikespub Thanks for clarifying. I think the best approach is for me to update the readme to say that 64-bit Home Assistant is required. This won't be the only add on that has that.