centralnicgroup-opensource/rtldev-middleware-whmcs

Exception with php7.3 and ionCube24 v13.0.2

Closed this issue · 7 comments

Hi @KaiSchwarz-cnic,

Describe the bug
After upgrading to v23.10.7 we see this error on WHMCS admin area (we are using v21.6.9 and works fine with php7.3 and ionCube24 v13.0.2):

Whoops\Exception\ErrorException: The file /application/public/manage/includes/hooks/ispapi_transliteration.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 7.3. in Unknown:0

To Reproduce
Steps to reproduce the behavior:

  1. Update to v23.10.7

Context (please complete the following information):

  • WHMCS Version 8.10.1
  • PHP Version 7.3.33
  • ionCube24 v13.0.2

#274 (comment)

That version is not compatible to PHP7. This has been brought to your attention in the above ticket.
We highly recommend switching to PHP8.

You're right, I forgot about that. Thanks for the reminder.

Uhm,

I'm trying to upgrade to v23.7.4, but I'm encountering the same error:

Whoops\Exception\ErrorException: The file /application/public/manage/includes/hooks/ispapi_transliteration.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 7.3. in Unknown:0

I suppose the issue with the minimum PHP version is not related to phpseclib, as the latest version requires php: >=5.6.1, as indicated on Packagist: https://packagist.org/packages/phpseclib/phpseclib#3.0.41. (Perhaps you're using dev dependencies of phpseclib that require PHP 8.x, like phpunit as indicated in the "Requires (Dev)" section of phpseclib on Packagist?) Instead, the issue seems to be with ionCube.

Thanks in advance.

You might be able to use PHP 7.4 if you want to stay on PHP 7 - but I'd recommend updating to PHP 8, unless you have a very good reason to use a PHP version that's unsupported.

That's interesting @pavons - we stumbled over issues with phpseclib pointing us to the deprecation of PHP7. I double checked this for their latest version as well, you're right about that they mention php: >=5.6.1.

If I recall correctly, it was about their sw dependency "paragonie/constant_time_encoding": "^2|^3" which is supporting PHP8 with version 3. Still, I see their version 2 mentioned as part of the composer.json which is still compatible to older php versions.

Let me check that again on our end, I don't recall the exact scenario, just that composer was facing us with php7 related issues when installing software deps.

mhmm ... I am sorry to say that it would be too much effort for us getting PHP7 again working.

Our dev container is based on latest ubuntu image FROM mcr.microsoft.com/devcontainers/base:1.0.15-ubuntu22.04.
I remember that a specific PPA received deprecation as well ppa:ondrej/php which we were using a while ago to get PHP version installed. By that we've had to remove this repository and the support of PHP7.3 and PHP7.4 ended for us. Getting that as well up and working again, is not worth the effort. PHP7, even though still support by WHMCS - the platform is as we know always supporting PHP versions that have already reached EOL. We on our end made the decision to deprecate PHP7 support as well and this is in work and expected to be released this year.

By all that, I can't get the issue we had with phpseclib reproduced any longer...

@DennisSkov is right, you may give PHP 7.4 a try. Finally that may help just temporarily. With v24, we'll be enforcing PHP8 officially (while we introduced it partially with more recent versions of v23).

If PHP 7.4 isn't working for you, please downgrade again to a version working for you.

No problem @KaiSchwarz-cnic, thank you so much.

I'll try to figure out upgrading to a latest supported php version or upgrading to a latest version of this module that support php73 just for now.