No Code Attached Yet bug
avatar jschmi102
jschmi102
16 Oct 2023

Steps to reproduce the issue

Install Joomla 4.4.0-rc1 on Win11 with JIT enabled

Expected result

frontsite should run successfully

Actual result

Execution fails with exeception "JIT on Windows is not currently supported"
caused by "../libraries/vendor/phpseclib/phpseclib/bootstrap.php"
by check at line 24

System information (as much as possible)

php version 8.1.6

Additional comments

If check for JIT at bootstrap.php is disabled (not execurted) problem is fixed
Seems that checking for JIT on a windows system is not OK.

avatar jschmi102 jschmi102 - open - 16 Oct 2023
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Oct 2023
avatar jschmi102 jschmi102 - change - 16 Oct 2023
Title
[4.4.0-rc1]Execution on Winows fails with JIT enabled
[4.4.0-rc1]Execution on Windows fails with JIT enabled
avatar jschmi102 jschmi102 - edited - 16 Oct 2023
avatar richard67
richard67 - comment - 16 Oct 2023

Obviously an issue with that 3rd party dependency.

See issue phpseclib/phpseclib#1941 and PR phpseclib/phpseclib#1942 there.

To fix it in Joomla it would need to update that dependency to their latest release https://github.com/phpseclib/phpseclib/releases/tag/3.0.23 .

avatar richard67 richard67 - change - 16 Oct 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 16 Oct 2023
avatar richard67
richard67 - comment - 16 Oct 2023

@jschmi102 Are you sure it was 4.4.0-rc1 which you have installed? In 4.4.0-rc1 the phpseclib/phpseclib dependency is already at version 3.0.23 in composer.lock, and the issue should have been fixed with that version. Maybe you have used a nightly build from before 4.4.0-rc1, i.e. a 4.4.0-rc1-dev?

avatar brianteeman
brianteeman - comment - 16 Oct 2023

The good news is that Joomla 5 does use that version

joomla-cms/composer.lock

Lines 3027 to 3028 in 806d266

"name": "phpseclib/phpseclib",
"version": "3.0.23",

And so does Joomla 4.4

avatar richard67
richard67 - comment - 16 Oct 2023

P.S.: The dependency was updated with PR #41829 in the 4.4-dev branch and that was merged up into 5.0-dev.

avatar richard67 richard67 - change - 16 Oct 2023
Labels Added: Information Required
avatar richard67 richard67 - labeled - 16 Oct 2023
avatar jschmi102
jschmi102 - comment - 16 Oct 2023

hi,
My joomla system indicates "4.4.0-rc1". JIT seems to be OK.
The check will throws an "UnexpectedValueException" if condition meets: !defined('PHPSECLIB_ALLOW_JIT)

avatar richard67
richard67 - comment - 16 Oct 2023

Ah I just checked again, and it seems their latest release doesn't include the changes from their PR phpseclib/phpseclib#1942 . It was merged 3 weeks ago but the release was before that. I was confused by another change in this release regarding JIT.

So they have to make a new release before we can update to that.

avatar richard67
richard67 - comment - 16 Oct 2023

@jschmi102 Do you have at least one of the 2 PHP extensions "GMP" and "BCMath" enabled?

avatar richard67
richard67 - comment - 16 Oct 2023

P.S.: And does it work for you when you apply the changes from phpseclib/phpseclib#1942 ? (Make backup before that to later fall back, or do it only on a testing site.)

avatar jschmi102
jschmi102 - comment - 16 Oct 2023

"GMP" and "BCMath" are enabled

avatar richard67
richard67 - comment - 16 Oct 2023

I've asked in their repo if they will make a new release which includes that change ( phpseclib/phpseclib#1942 ). They said they will try to make one this week. I'll watch their repo for that and will make PR here to update our dependency when that is ready. In the mean time you only can switch JIT off or use the workaround to remove the check.

avatar richard67 richard67 - change - 16 Oct 2023
Labels Removed: Information Required
avatar richard67 richard67 - unlabeled - 16 Oct 2023
avatar jschmi102
jschmi102 - comment - 18 Oct 2023

hi,
seems that change ( phpseclib/phpseclib#1942 ) has not added to joomla 4.4.0 as I get same error now in current release.

avatar richard67
richard67 - comment - 18 Oct 2023

@jschmi102 As I have explained above, that change is not yet in any release of phpseclib so it can‘t be in Joomla either, and that they work on a new release so we can get that into 4.4.1 and 5.0.1.

avatar richard67
richard67 - comment - 18 Oct 2023

@jschmi102 P.S.: What you could do if you have a testing environment, i.e. a copy of your site in a subfolder, a subdomain or on a local webserver: You could download the changed files from https://github.com/phpseclib/phpseclib/pull/1942/files and put them to their place in folder "libraries/vendor/phpseclib/phpseclib/phpseclib", check if the change helps and report back the result. That would be really a great help.

File "bootstrap.php" goes into the folder mentioned above, file "BigInteger.php" goes into subfolder "Math", and the other 3 changed PHP files go into subfolder "Math/BigInteger/Engines".

avatar colibriful
colibriful - comment - 20 Oct 2023

I tried your fix on a local testing environment and it worked. Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42142.

avatar richard67
richard67 - comment - 21 Oct 2023

They have just made a new release of phpseclib which includes that change: https://github.com/phpseclib/phpseclib/releases/tag/3.0.33

I will prepare a PR to update our dependency to that.

avatar jschmi102
jschmi102 - comment - 21 Oct 2023

hi,

installed and tested code with joomla 4.4.0 and joomla V5. It works on both!

Thank you!

avatar richard67 richard67 - change - 21 Oct 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-10-21 15:48:39
Closed_By richard67
avatar richard67 richard67 - close - 21 Oct 2023
avatar richard67
richard67 - comment - 21 Oct 2023

Closing as having a pull request. Please test #42190 .

@jschmi102 @colibriful You can do that test on a testing environment or a copy of your life site (but please not on a productive site) by using the custom update URL https://ci.joomla.org/artifacts/joomla/joomla-cms/4.4-dev/42190/downloads/71359/pr_list.xml for live update or the custom update package https://ci.joomla.org/artifacts/joomla/joomla-cms/4.4-dev/42190/downloads/71359/Joomla_4.4.1-dev+pr.42190-Development-Update_Package.zip for upload & update (both created by Drone for that PR).

Thanks in advance.

Add a Comment

Login with GitHub to post a comment