Hi,
A customer of ours tries to upgrade his moodle website from version 3.9.1 to 3.9.2-137. During the upgrade he gets the following message: error stream: 'PHP Fatal error: Cannor redeclare error() in /var/www/vhosts/exampledomain/httpdocs/lib/deprecatedlib.php on line 686
Now i opend the file deprecated lib on line 686 and says the following:
/**
* @deprecated since 2.0
*/
function error() {
throw new coding_exception('notlocalisederrormessage', 'error', $link, $message, 'error() is a removed, please call
print_error() instead of error()');
}
So, i tried to comment the deprecated function and re-run the upgrade. Still the same error. After that i enabled plesk logging to see what is going on. I did see in the log that the moodle package is being cahed. See this line:
ERR [panel] PleskUtilException: '/usr/local/psa/admin/bin/sappmng' '--run-application-script' '--script-file-name=configure' '--script-name=upgrade' '--script-language=php' '--user-name=exampleuser' '--php-cli=/opt/plesk/php/7.3/bin/php' '--php-ini=/var/www/vhosts/system/exampledomain/etc/php.ini' '--application-full-name=file:////usr/local/psa/var/apspackages/adiMLWzLe.zipa1d1241c-ccdb-5acb-be14/cache' '--' '3.9.1' '136' failed with code 255.
From there i headed to the cached package and finded the same deprecated function in: /usr/local/psa/var/apspackages/adiMLWzLe.zipa1d1241c-ccdb-5acb-be14/cache/htdocs/lib/deprecatedlib.php and removed the @deprecated since 2.0 function. After that I re-runned the upgrade. It worked! Could it be that plesk is pulling a wrong package of is something realy deprecated in the website of the customer, or do i not understand what is happening here.
moodle version: 3.9.2-137
plesk version: Plesk Obsidian 18.0.29
Centos version: CentOS Linux 7.8.2003 (Core)
A customer of ours tries to upgrade his moodle website from version 3.9.1 to 3.9.2-137. During the upgrade he gets the following message: error stream: 'PHP Fatal error: Cannor redeclare error() in /var/www/vhosts/exampledomain/httpdocs/lib/deprecatedlib.php on line 686
Now i opend the file deprecated lib on line 686 and says the following:
/**
* @deprecated since 2.0
*/
function error() {
throw new coding_exception('notlocalisederrormessage', 'error', $link, $message, 'error() is a removed, please call
print_error() instead of error()');
}
So, i tried to comment the deprecated function and re-run the upgrade. Still the same error. After that i enabled plesk logging to see what is going on. I did see in the log that the moodle package is being cahed. See this line:
ERR [panel] PleskUtilException: '/usr/local/psa/admin/bin/sappmng' '--run-application-script' '--script-file-name=configure' '--script-name=upgrade' '--script-language=php' '--user-name=exampleuser' '--php-cli=/opt/plesk/php/7.3/bin/php' '--php-ini=/var/www/vhosts/system/exampledomain/etc/php.ini' '--application-full-name=file:////usr/local/psa/var/apspackages/adiMLWzLe.zipa1d1241c-ccdb-5acb-be14/cache' '--' '3.9.1' '136' failed with code 255.
From there i headed to the cached package and finded the same deprecated function in: /usr/local/psa/var/apspackages/adiMLWzLe.zipa1d1241c-ccdb-5acb-be14/cache/htdocs/lib/deprecatedlib.php and removed the @deprecated since 2.0 function. After that I re-runned the upgrade. It worked! Could it be that plesk is pulling a wrong package of is something realy deprecated in the website of the customer, or do i not understand what is happening here.
moodle version: 3.9.2-137
plesk version: Plesk Obsidian 18.0.29
Centos version: CentOS Linux 7.8.2003 (Core)