Roundcube Community Forum

Release Support => Pending Issues => Topic started by: vention on January 26, 2024, 08:22:00 AM

Title: PHP Fatal error Undefined constant CAMELLIA256 plugins/enigma/config.inc.php:33
Post by: vention on January 26, 2024, 08:22:00 AM
Hello,
I have upgraded Roundcube (LAMP) from 1.4.11 to 1.6.6 (under PHP 7.4).
The upgrade wend almost OK except these lines:
Executing /usr/bin/composer to update dependencies...
PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163-------------------
ATTENTION: Update dependencies by running `php composer.phar update --no-dev`

This proposal does not work:
root@mail:/var/log/roundcube# php composer.phar update --no-dev
Could not open input file: composer.phar
Where is this file? Do i need it?

Roundcube 1.6.6 seems to be working OK under PHP 7.4.
When i enable PHP 8.1, Other applications work OK on the host.

But roundcube web page gives this "very clear" error:
"Something went wrong".

In the roundcube errors.log i see 2 fatal errors:
PHP Fatal error:  Uncaught Error: Undefined constant "CAMELLIA256" in /var/www/roundcube/plugins/enigma/config.inc.php:33
PHP Fatal error:  Uncaught Error: Undefined constant "SHA512" in /var/www/roundcube/plugins/enigma/config.inc.php:37

Does roundcube support PGP?
How do i make it work under PHP 8.1?
Will PGP be disabled, if i comment out these 2 (or more) lines?
Does roundcube upgrades work under PHP 8.1?
Thanks
Title: Re: PHP Fatal error Undefined constant CAMELLIA256 plugins/enigma/config.inc.php:33
Post by: alec on January 26, 2024, 01:13:45 PM
Hello,
I have upgraded Roundcube (LAMP) from 1.4.11 to 1.6.6 (under PHP 7.4).
The upgrade wend almost OK except these lines:
Executing /usr/bin/composer to update dependencies...
PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163-------------------
ATTENTION: Update dependencies by running `php composer.phar update --no-dev`
[\quote]

You have to update your composer.

Quote
In the roundcube errors.log i see 2 fatal errors:
PHP Fatal error:  Uncaught Error: Undefined constant "CAMELLIA256" in /var/www/roundcube/plugins/enigma/config.inc.php:33
PHP Fatal error:  Uncaught Error: Undefined constant "SHA512" in /var/www/roundcube/plugins/enigma/config.inc.php:37

These "labels" need to be in single or double quotes. PHP7 was less strict about this, now it is a fatal error.
Title: Re: PHP Fatal error Undefined constant CAMELLIA256 plugins/enigma/config.inc.php:33
Post by: vention on January 29, 2024, 05:21:57 AM
Hello,
OK, i have installed the composer using
https://getcomposer.org/doc/00-intro.md (https://getcomposer.org/doc/00-intro.md)
It looks OK now.

Then i have added 'quotes' around CAMELLIA256 and SHA512 and no more errors when switching to PHP 8.1
Many thanks  :)