Author Topic: PHP Fatal error Undefined constant CAMELLIA256 plugins/enigma/config.inc.php:33  (Read 1360 times)

Offline vention

  • Newbie
  • *
  • Posts: 2
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
« Last Edit: January 26, 2024, 08:26:02 AM by vention »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
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.

Offline vention

  • Newbie
  • *
  • Posts: 2
Hello,
OK, i have installed the composer using
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  :)