Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.4.0-rc1]Execution on Windows fails with JIT enabled #42142

Closed
jschmi102 opened this issue Oct 16, 2023 · 17 comments
Closed

[4.4.0-rc1]Execution on Windows fails with JIT enabled #42142

jschmi102 opened this issue Oct 16, 2023 · 17 comments

Comments

@jschmi102
Copy link

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.

@jschmi102 jschmi102 changed the title [4.4.0-rc1]Execution on Winows fails with JIT enabled [4.4.0-rc1]Execution on Windows fails with JIT enabled Oct 16, 2023
@richard67
Copy link
Member

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 .

@richard67 richard67 added the bug label Oct 16, 2023
@richard67
Copy link
Member

@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?

@brianteeman
Copy link
Contributor

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

@richard67
Copy link
Member

richard67 commented Oct 16, 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.

@jschmi102
Copy link
Author

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)

@richard67
Copy link
Member

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.

@richard67
Copy link
Member

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

@richard67
Copy link
Member

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.)

@jschmi102
Copy link
Author

jschmi102 commented Oct 16, 2023

"GMP" and "BCMath" are enabled

@richard67
Copy link
Member

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.

@jschmi102
Copy link
Author

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

@richard67
Copy link
Member

@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.

@richard67
Copy link
Member

@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".

@colibriful
Copy link

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.

@richard67
Copy link
Member

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.

@jschmi102
Copy link
Author

jschmi102 commented Oct 21, 2023

hi,

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

Thank you!

@richard67
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants