Fatal error when I try to import JCB Package #979

Closed
opened 2023-02-23 01:32:27 +00:00 by oxido · 2 comments

Steps to reproduce the issue

JCB > Import JCB Package
Use Upload tab or Directory tab

Expected result

To upload the package

Actual result

Warning: require_once(.../libraries/phpseclib/vendor/autoload.php): failed to open stream: No such file or directory in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293

Fatal error: require_once(): Failed opening required '.../libraries/phpseclib/vendor/autoload.php' (include_path='.:/opt/alt/php74/usr/share/pear') in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293

System information (as much as possible)

  • OS Name & Version:
  • MySql Version: 10.3.38-MariaDB
  • Apache Version:
  • PHP Version: 7.4.33 / 7.2.x / 8.2.x
  • Joomla Version: 3.10.11
  • JCB Version: 3.1.17
  • Browser: Google Chrome

Additional comments

I did a small investigation, and I saw that in the JCB install package, there is no phpseclib, but a phpseclib3.
And in administrator/components/com_componentbuilder/helpers/componentbuider.php is asking for phpseclib.
After I renamed the folder from phpseclib3 => phpseclib, I get this error:

The \phpseclib\Crypt\AES library\class is not available! This library\class should have been added to your libraries/phpseclib/vendor folder. Please contact your system administrator for more info!
so the path it should be: libraries/phpseclib/vendor/phpseclib/Crypt/AES

But in JCB package 3.1.17 the path is: /libraries/phpseclib/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES

### Steps to reproduce the issue JCB > Import JCB Package Use Upload tab or Directory tab ### Expected result To upload the package ### Actual result Warning: require_once(.../libraries/phpseclib/vendor/autoload.php): failed to open stream: No such file or directory in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293 Fatal error: require_once(): Failed opening required '.../libraries/phpseclib/vendor/autoload.php' (include_path='.:/opt/alt/php74/usr/share/pear') in .../administrator/components/com_componentbuilder/helpers/componentbuilder.php on line 4293 ### System information (as much as possible) - OS Name & Version: - MySql Version: 10.3.38-MariaDB - Apache Version: - PHP Version: 7.4.33 / 7.2.x / 8.2.x - Joomla Version: 3.10.11 - JCB Version: 3.1.17 - Browser: Google Chrome ### Additional comments I did a small investigation, and I saw that in the JCB install package, there is no phpseclib, but a phpseclib3. And in administrator/components/com_componentbuilder/helpers/componentbuider.php is asking for phpseclib. After I renamed the folder from phpseclib3 => phpseclib, I get this error: `The \phpseclib\Crypt\AES library\class is not available! This library\class should have been added to your libraries/phpseclib/vendor folder. Please contact your system administrator for more info!` so the path it should be: `libraries/phpseclib/vendor/phpseclib/Crypt/AES` But in JCB package 3.1.17 the path is: `/libraries/phpseclib/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES`
Owner

Apologies with Explanation:

First of all let me apologies for having caused this inconvenience, I removed version 2 of phpseclip from JCB prematurely.

We are in the transition to version 3, since it is PHP 8+ compatible while version is not.

I have already written most of the code so we can now use the new phpseclib version 3, but I have not fully linked it up across JCB itself. Here are all the places you can see the new library version 3 being used:

I have already added these changes to the compiler, in a few places. But I have not completed the JCB packaging area. Though I started, as you can see the new packaging area code here.

Okay for the easy fix:

Just renaming the folder from phpseclib3 to phpseclib will not work and will break more things, so you first make sure the new folder is still phpseclib3.

Then you download JCB v3.1.12 and unzip the package locally and move the library/phpseclib folder, into your joomla websites library folder.

That should cause all things to work as before. Let me know if you still not having success!

We should have this resolved soon, and then you will no longer need to do these gymnastics.

### Apologies with Explanation: First of all let me apologies for having caused this inconvenience, I removed [version 2 of phpseclip](https://github.com/phpseclib/phpseclib/tree/2.0) from JCB prematurely. We are in the [transition to version 3](https://github.com/phpseclib/phpseclib/releases/tag/3.0.18), since it is PHP 8+ compatible while version is not. I have already written most of the code so we can now use the new [phpseclib version 3](https://github.com/phpseclib/phpseclib/tree/3.0), but I have not fully linked it up across JCB itself. Here are all the places you can see the new library version 3 being used: - [Componentbuilder/Server.php](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server.php) - [Componentbuilder/Server/](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Server) - [Componentbuilder/Crypt.php](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt.php) - [Componentbuilder/Crypt](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Crypt) I have already added these changes to the compiler, in a few places. But I have not completed the JCB packaging area. Though I started, as you can see the [new packaging area code here](https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Package). ### Okay for the easy fix: Just renaming the folder from phpseclib3 to phpseclib will not work and will break more things, so you first make sure the new folder is still phpseclib3. Then you download [JCB v3.1.12](https://git.vdm.dev/joomla/Component-Builder/archive/v3.1.12.zip) and unzip the package locally and move the [library/phpseclib](https://git.vdm.dev/joomla/Component-Builder/src/tag/v3.1.12/libraries/phpseclib) folder, into your joomla websites library folder. That should cause all things to work as before. Let me know if you still not having success! We should have this resolved soon, and then you will no longer need to do these gymnastics.
oxido closed this issue 2023-02-23 12:38:46 +00:00
Owner

This should now be fixed in JCB 3.1.19 that was just released. Meaning you should be able to import packages without the need of the old pspseclib version 2 loaded.

This should now be fixed in JCB 3.1.19 that was just released. Meaning you should be able to import packages without the need of the old pspseclib version 2 loaded.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#979
No description provided.