Author Topic: Fixed (I think!): random.php error during upgrade from 1.6.0 to 1.6.1  (Read 14012 times)

Offline chaser

  • Jr. Member
  • **
  • Posts: 20
Hi,

I tried upgrading from 1.6.0 to 1.6.1, but got the following error, and now roundcube no longer loads in the web browser, with a 'is currently unable to handle this request' error. I've tried to disable all the plugins, but that hasn't made any difference. Any pointers, please?

Code: [Select]
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information                                                    Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Package operations: 6 installs, 8 updates, 6 removals
  - Removing symfony/polyfill-php72 (v1.19.0)
  - Removing symfony/polyfill-php70 (v1.19.0)
  - Removing symfony/polyfill-intl-normalizer (v1.19.0)
  - Removing symfony/polyfill-intl-idn (v1.19.0)
  - Removing paragonie/random_compat (v2.0.20)
  - Removing endroid/qr-code (1.6.6)
  - Updating roundcube/plugin-installer (0.3.1 => 0.3.2): Downloading (100%)
  - Updating pear/net_smtp (1.10.0 => 1.10.1): Downloading (100%)
  - Updating pear/crypt_gpg (v1.6.6 => v1.6.7): Downloading (100%)
  - Updating pear/net_sieve (1.4.5 => 1.4.6): Downloading (100%)
  - Updating masterminds/html5 (2.7.5 => 2.7.6): Downloading (100%)
  - Installing symfony/deprecation-contracts (v2.5.2): Downloading (100%)
  - Installing psr/http-client (1.0.1): Downloading (100%)
  - Installing psr/http-factory (1.0.1): Downloading (100%)
  - Updating guzzlehttp/psr7 (1.8.3 => 2.4.4): Downloading (100%)
  - Updating guzzlehttp/promises (1.5.1 => 1.5.2): Downloading (100%)
  - Updating guzzlehttp/guzzle (6.5.5 => 7.5.0): Downloading (100%)


  [ErrorException]
  require(/var/www/html/webmail/vendor/composer/../paragonie/random_compat/lib/random.php): failed to open stream: No such file or directory


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

-----------------------------------------------------------------------------
ATTENTION: Update dependencies by running `php composer.phar update --no-dev`
-----------------------------------------------------------------------------
This instance of Roundcube is up-to-date.
Have fun!
All done.

Edit: Tried the upgrade again, and got this:

Code: [Select]
[root@freepbx roundcubemail-1.6.1]# ./bin/installto.sh /var/www/html/webmail/
Target installation already in version 1.6.1. Do you want to update again? (y/N)
y
Copying files to target location....htaccess.new
done.

NOTICE: New .htaccess file saved as .htaccess.new.

Running update script at target...
PHP Warning:  require(/var/www/html/webmail/vendor/composer/../paragonie/random_compat/lib/random.php): failed to open stream: No such file or directory in /var/www/html/webmail/vendor/composer/autoload_real.php on line 73
PHP Stack trace:
PHP   1. {main}() /var/www/html/webmail/bin/update.sh:0
PHP   2. require_once() /var/www/html/webmail/bin/update.sh:23
PHP   3. require_once() /var/www/html/webmail/program/include/clisetup.php:25
PHP   4. require() /var/www/html/webmail/program/include/iniset.php:64
PHP   5. ComposerAutoloaderInit3eaa1b591606c916cbb614df96df29f3::getLoader() /var/www/html/webmail/vendor/autoload.php:7
PHP   6. composerRequire3eaa1b591606c916cbb614df96df29f3() /var/www/html/webmail/vendor/composer/autoload_real.php:63
PHP Warning:  require(/var/www/html/webmail/vendor/composer/../paragonie/random_compat/lib/random.php): failed to open stream: No such file or directory in /var/www/html/webmail/vendor/composer/autoload_real.php on line 73
PHP Stack trace:
PHP   1. {main}() /var/www/html/webmail/bin/update.sh:0
PHP   2. require_once() /var/www/html/webmail/bin/update.sh:23
PHP   3. require_once() /var/www/html/webmail/program/include/clisetup.php:25
PHP   4. require() /var/www/html/webmail/program/include/iniset.php:64
PHP   5. ComposerAutoloaderInit3eaa1b591606c916cbb614df96df29f3::getLoader() /var/www/html/webmail/vendor/autoload.php:7
PHP   6. composerRequire3eaa1b591606c916cbb614df96df29f3() /var/www/html/webmail/vendor/composer/autoload_real.php:63
PHP Fatal error:  require(): Failed opening required '/var/www/html/webmail/vendor/composer/../paragonie/random_compat/lib/random.php' (include_path='/var/www/html/webmail/vendor/pear/auth_sasl:/var/www/html/webmail/vendor/pear/console_commandline:/var/www/html/webmail/vendor/pear/console_getopt:/var/www/html/webmail/vendor/pear/crypt_gpg:/var/www/html/webmail/vendor/pear/mail_mime:/var/www/html/webmail/vendor/pear/net_idna2:/var/www/html/webmail/vendor/pear/net_smtp:/var/www/html/webmail/vendor/pear/net_socket:/var/www/html/webmail/vendor/pear/pear-core-minimal/src:/var/www/html/webmail/vendor/pear/pear_exception:/var/www/html/webmail/program/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/webmail/vendor/composer/autoload_real.php on line 73
PHP Stack trace:
PHP   1. {main}() /var/www/html/webmail/bin/update.sh:0
PHP   2. require_once() /var/www/html/webmail/bin/update.sh:23
PHP   3. require_once() /var/www/html/webmail/program/include/clisetup.php:25
PHP   4. require() /var/www/html/webmail/program/include/iniset.php:64
PHP   5. ComposerAutoloaderInit3eaa1b591606c916cbb614df96df29f3::getLoader() /var/www/html/webmail/vendor/autoload.php:7
PHP   6. composerRequire3eaa1b591606c916cbb614df96df29f3() /var/www/html/webmail/vendor/composer/autoload_real.php:63
All done.
[root@freepbx roundcubemail-1.6.1]#

Edit 2: Right, removing the composer.json file has fixed the issue for me! This requirement is detailed in the github pages, but I initially used the UPGRADING instructions that is included in the distribution, and there's no mention about removing composer.json in that file (well, not that I could see).
« Last Edit: March 25, 2023, 08:00:28 PM by chaser »