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

Getting Fatal Error: Class Crypt_RSA not found #64

Closed
redjersey opened this issue Jan 11, 2016 · 28 comments · Fixed by #69
Closed

Getting Fatal Error: Class Crypt_RSA not found #64

redjersey opened this issue Jan 11, 2016 · 28 comments · Fixed by #69
Assignees
Labels
Milestone

Comments

@redjersey
Copy link

I have installed da-letsencrypt, with php = 5.5.x and have sni enabled.

In DA, when I go to the user level, select the domain / subdomain and tried to request a SSL certificate, click on the TOS checkbox and submit, I got:

Fatal error: Class 'Crypt_RSA' not found in /usr/local/directadmin/plugins/da-letsencrypt/includes/lib/Account.php on line 94

@Wouter0100 Wouter0100 self-assigned this Jan 11, 2016
@Wouter0100 Wouter0100 added this to the 1.0 milestone Jan 11, 2016
@Wouter0100
Copy link
Collaborator

Hmm. It seems like you still have problems with your dependencies. Crypt_RSA is one of them. What do you get when you do a composer update in the plugin dir? (please past it within ticks or through github gist)

@redjersey
Copy link
Author

this is what I got:

git pull
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git-remote-https: /usr/local/lib/libz.so.1: no version information available (required by git-remote-https)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
git: /usr/local/lib/libz.so.1: no version information available (required by git)
Unpacking objects: 100% (4/4), done.
From https://github.com/Petertjuh360/da-letsencrypt
ba896c6..7e58182 master -> origin/master
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
git-merge: /usr/local/lib/libz.so.1: no version information available (required by git-merge)
Updating ba896c6..7e58182
error: Your local changes to 'scripts/cron.php' would be overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.

php composer.phar update

Loading composer repositories with package information
Updating dependencies (including require-dev)

  • Installing sabre/uri (1.0.1)
    Loading from cache

and I can't still get rid of the Fatal error: Class 'Crypt_RSA' not found error

@barryvdh
Copy link
Contributor

@Wouter0100 Are you sure that Crypt_RSA is a dependancy? It's a PEAR repo, which migrated to phpseclib (https://github.com/phpseclib/phpseclib)
Should we require phpseclib/phpseclib:2.x and use the full namespace phpseclib\Crypt\RSA instead of Crypt_RSA?

@barryvdh
Copy link
Contributor

See https://pear.php.net/package/Crypt_RSA

This package is not maintained anymore and has been superseded. Package has moved to channel phpseclib.sourceforge.net, package Crypt_RSA.
Summary
Provides RSA-like key generation, encryption/decryption, signing and signature checking. Users are strongly advised to migrate to phpseclib's Crypt_RSA; which is better maintained and less vulnerable to security issues.

Perhaps the PEAR package is installed on some servers by default.

@Wouter0100
Copy link
Collaborator

Hmm, yeah. We should add that one, I guess we should receive it through another dependency, but we're also using this one.

@zenire
Copy link
Owner

zenire commented Jan 15, 2016

The comment of @barryvdh to use `phpseclib\Crypt\RSA is tested by an user of the plugin and it works fine.

@Wouter0100
Copy link
Collaborator

Hmm, if that user could open a PR, would be awesome ;)

@WaaaghNL
Copy link

Just messed up a install of this plugin. Removed everything and pulled the plugin again. Now i got this error also.

@Wouter0100
Copy link
Collaborator

Hmm, can you add the package to the composer.json and test again?

@WaaaghNL
Copy link

Like so?
{ "require": { "kelunik/acme": "^0.2.1", "php": ">=5.5.0", "phpseclib/phpseclib":"2.x" }, "minimum-stability": "dev", "autoload": { "psr-4": { "DirectAdmin\\LetsEncrypt\\Lib\\": "includes/lib" } } }

and then run cd /usr/local/directadmin/plugins/da-letsencrypt git pull composer update

Output:
[root@web20 da-letsencrypt]# composer update Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Writing lock file Generating autoload files

Output in DA:
Fatal error: Class 'Crypt_RSA' not found in /usr/local/directadmin/plugins/da-letsencrypt/includes/lib/Account.php on line 94

@barryvdh
Copy link
Contributor

Thats a different class name.

@WaaaghNL
Copy link

Uuhm what do i need to correct. I think i'm missing someting ;-)

@stijnvanouplines
Copy link

I'm getting the same error with a fresh install of the plugin.

@zenire
Copy link
Owner

zenire commented Jan 17, 2016

@svouplin Which version of PHP are you using?

@stijnvanouplines
Copy link

@Petertjuh360 I'm using PHP 5.5.31

@Swissgroove
Copy link

Had the same error. Went to Admin level -> "Let's Encrypt Certificates" -> selected "Let's Encrypt Live" and saved. Then back to user level to request SSL certificate for domain and it worked.

@stijnvanouplines
Copy link

When I go to Admin level -> "Let's Encrypt Certificates" I get an error:
"Please select a domain first at the DirectAdmin homepage."

@Wouter0100
Copy link
Collaborator

@svouplin please create another issue for this with debug information.

@Swissgroove That won't solve the problem for sure.

@stijnvanouplines
Copy link

@Wouter0100 That error is now gone. And the solution from @Swissgroove doesn't work for me.

@redjersey
Copy link
Author

why this is close? how to fix that problem? even if I go to admin letsencrypt and set it to live, I'm still getting the Class Crypt_RSA not found error

@Wouter0100
Copy link
Collaborator

Because there is an open PR which fixes this.

@WaaaghNL
Copy link

But the problem isn't fixt with the PR, still the same error on the user page. pulled 5min ago as clean install...

@ghost
Copy link

ghost commented Jan 21, 2016

@WaaaghNL The pull request has to be merged first.

@WaaaghNL
Copy link

oops my bad

@Wouter0100
Copy link
Collaborator

It doesn't need to be merged. If you switch to the da-letsencrypt-64-branch, it should be working. If you're able to confirm it's working properly, that it's ready to be merged in master :)

@WaaaghNL
Copy link

@Wouter0100 it's working, but i'm back to #57

@stijnvanouplines
Copy link

da-letsencrypt-64 branch is working fine!

@Wouter0100
Copy link
Collaborator

It's already merged in master.

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

Successfully merging a pull request may close this issue.

7 participants