Hi, i tried to install php project in localhost using xampp and encounter the error below. Please advise how to solve the issue. Thanks.

A PHP Error was encountered
Severity: 8192
Message: Function mcrypt_get_iv_size() is deprecated
Filename: libraries/Encrypt.php
Line Number: 338
A PHP Error was encountered
Severity: 8192
Message: Function mcrypt_decrypt() is deprecated
Filename: libraries/Encrypt.php
Line Number: 347

Hi,

in this case the artisan command won't solve the issue, because it's PHP telling those functions are deprecated as PHP 7.1.0.

The Mcrypt library has been declared deprecated and will be moved to PECL with the release of PHP 7.2.0, this because it relies on libmcrypt which has not been developed or mantained since 2007, see:

To solve, update the code with an alternative library.

Thanks a lot for your advise rproffitt & cereal.

@sophia_4

You're welcome, I just realized you are usign CodeIgniter here, then you can use the Encryption library rather than the Encrypt library which is deprecated in the framework, see:

If the issue is solved, please press the solved button at the right side of the page, bye! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.