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

mcrypt is deprecated in PHP 7 #158

Closed
zackkrida opened this issue Feb 15, 2017 · 15 comments
Closed

mcrypt is deprecated in PHP 7 #158

zackkrida opened this issue Feb 15, 2017 · 15 comments

Comments

@zackkrida
Copy link

zackkrida commented Feb 15, 2017

In the Quickbooks/Aes.php file you are using mcrypt for encryption.

https://github.com/consolibyte/quickbooks-php/blob/master/QuickBooks/Encryption/Aes.php#L34

Mcrypthas been deprecated in PHP 7.1 in favor of openSSL.

OSX users working locally may want to brew install php71-mcrypt.
On Ubuntu you'll want to sudo apt-get install php7.1-mcrypt
Or via yum with yum install php71-php-mcrypt

@nateajohnson
Copy link

Is there a way to ignore the warnings then? I get this:

Function mcrypt_module_open() is deprecated

It looks like warnings are turned on STRICT all through this library.

@nateajohnson
Copy link

I added this to the top of the file I am calling and it seems to work:

error_reporting(E_ALL &~ E_DEPRECATED);

That said, once PHP removed mcrypt support, this library will stop working.

@zettich
Copy link

zettich commented Jul 12, 2017

mcrypt is deprecated in 7.1
you should add a dependency for this in composer.json to meet PHP < 7.1

@CaptainHypertext
Copy link

Was this issue ever solved in a patch or something?

@marabesi
Copy link

UP

@webdevsoup
Copy link

Going to bump this. I ran in to this error today. Trying to run on my Docker installation, and mcrypt is deprecated from php7.1, and completely removed in php7.2.

@tvaughan73
Copy link
Contributor

While mcrypt was removed from PHP 7.2 it can still be installed via PECL. Not a long term solution though. I have no idea what is involved with adding openssl support to this framework but I suspect its not trivial since it would need to support both mcrypt and openssl. Otherwise, only supporting openssl would break current installations.

@bryonbean
Copy link

I'm wondering if anyone using this package with php 7.2 has tried phpseclib's mcrypt shim instead of installing mcrypt. It seems like it should work as it supports Rijndael 256; thoughts?

@bryonbean
Copy link

Sorry, I didn't see this in the README of phpseclib's mcrypt shim:

Although nofb is supported ofb is not.

The file mentioned in the OP uses ofb, though it may be trivial to switch to nofb? Not sure.

@amirshawn
Copy link

I'm curious if anyone has figured out a good way to get around this without editing any of the package files?

@gsalmon
Copy link

gsalmon commented Jan 15, 2019

BUMP.
Heres a workaround: http://www.netsuite.com

@aik099
Copy link
Contributor

aik099 commented Jun 25, 2019

Any update on this?

The mcrypt installed via PECL on PHP 7.2 works, but I have tons of warnings. Not sure if PECL would save the day on PHP 7.3 or later.

@consolibyte
Copy link
Owner

We'll be making some updates here soon (we generally follow Debian stable releases, so because Debian hasn't had PHP 7.2 yet -- they will in July) we haven't made updates here yet.

@WiredWonder
Copy link

#228

@zackkrida
Copy link
Author

As I'm not using this library anymore I'd like to close it and direct folks to the other relevant issue #228. Thanks all!

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

No branches or pull requests