1

on our staging environment we upgraded to Drupal 10.2.0 - CiviCRM 5.69.4 - PHP 8.2.15

On the Plesk server for the domain there is a scheduled (cron) job created as: script path = httpdocs/vendor/bin/cv arguments = api job.execute --user=cronuser --cwd=/var/www/vhosts/staging.*./httpdocs --quiet Use PHP version = 8.2.15 on run we got errors in website logging:

mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 474, referer: https://staging.x.x/admin/reports/status Apache error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 547, referer: https://staging.x.x/admin/reports/status Apache error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 549, referer: https://staging.x.x/admin/reports/status Apache error mod_fcgid: stderr: PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/vhosts/staging.x.x/httpdocs/vendor/pear/db/DB.php on line 552, referer: https://staging.x.x/admin/reports/status Apache error

As a workarround I tried decreasing the Jobs PHP version to 8.1.27, but this results in: PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0"

Task "httpdocs/vendor/bin/cv" completed with error in 0 seconds, output:

PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.27. in /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform_check.php on line 28 Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.27. in /var/www/vhosts/staging.x.x/httpdocs/vendor/composer/platform_check.php on line 28

1 Answer 1

2

The {$var} thing is fixed in civi 5.71 but is unimportant. The important line is Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.27

You have something in your composer.json or installed that requires php 8.2 but you're using 8.1.

2
  • thanks for your answer. But to my regret I asked the question with a wrong place of the log parts. The site is running with PHP 8.2.15, using that version i get those deprecation errors. As a workarround I've tried to run the cron task against a lower PHP version. But this result in the Compose-PHP version mismatch. I edited my text to ask the question more correctly. best regards Commented Feb 8 at 22:20
  • I don't think anything's changed though. The $var warning isn't important. Your install was based on 8.2, so it requires 8.2. Either remove the vendor folder and composer.lock and re-run composer install using 8.1 (not recommended), or if you don't like the log warnings then in php.ini change error_reporting to error_reporting = 1, or try composer update pear/db:'~1.12.1'.
    – Demerit
    Commented Feb 10 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.