CollaboraOnline / richdocumentscode

Built-in CODE Server app
https://apps.nextcloud.com/apps/richdocumentscode
Apache License 2.0
111 stars 26 forks source link

Wrong check for architecture - in case string is not exact X86_64 #255

Open berndpodey opened 6 months ago

berndpodey commented 6 months ago

I found an issue in nextcloud when installing the collabora Online Code Server edition for X86_64 in STRATO.

Despite it is clearly an X86_64 architecture - there is the error message telling it differently.

Please update the check that you are doing for the architecture of installation:

php_uname('M') == 'X86_64' or php_uname('M') == 'x86_64' - towards a string find for "x86_64" into the result of php_uname.

STRATO return is: Linux localhost 4.18.0-477.27.1.el8_8.x86_64 #1 SMP

so there is x86_64 in the string - but not exactly the string.

joshtrichards commented 4 months ago

php_uname('M') == 'X86_64' or php_uname('M') == 'x86_64' - towards a string find for "x86_64" into the result of php_uname.

This app calls php_uname("m") so your example string shouldn't be what PHP is providing.

STRATO return is: Linux localhost 4.18.0-477.27.1.el8_8.x86_64 #1 SMP

This doesn't look like the output of php_name("m") but more like what php_uname() or php_name("a") might provide.

Can you provide the exact error message you're seeing?

And perhaps the output of running this from the command-line of your host:

php -r 'echo php_uname("m") . "\n";'

janalysis commented 1 month ago

I am having the same problem. When I run: php -r 'echo php_uname("m") . "\n";'

I get: amd64

Can an or be added to catch this?

EDITED: Nevermind, I see FreeBSD is not supported.