Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Use of mcrypt #1275

Open
JustJeremy opened this issue Jun 26, 2017 · 19 comments
Open

Use of mcrypt #1275

JustJeremy opened this issue Jun 26, 2017 · 19 comments

Comments

@JustJeremy
Copy link

Function mcrypt_create_iv() is deprecated in PHP 7 and will be removed in PHP 7.2
Cheers!

@kalyan2k
Copy link

sorry what is the best way to replace mcrypt_create_iv() function?

@silverark
Copy link
Contributor

Where is currently being used in Bonfire? CI has it as a fallback.

@kalyan2k
Copy link

thanks :)

@Altroo
Copy link

Altroo commented Oct 5, 2017

yeah i'm having that : Message: Function mcrypt_create_iv() is deprecated
when i activate french translation.

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

What version of Bonfire are you using?

I enabled the French translation and didn't see that.

@Altroo
Copy link

Altroo commented Oct 6, 2017

Hello i'm using the last version & here's the error :

sans titre

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

Sorry, couldn't reproduce this error but the only other thing I can think of is do you have openSSL enabled ?

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

Also on a side note, what browser are you using? That icon in the top right is really bothering me.

@Altroo
Copy link

Altroo commented Oct 6, 2017

I'm using google chrome & how can i check if openSSL is enabled?

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

phpinfo() ;)

I've just checked on chrome and that icon doesn't look like that, you're testing on your local system, right ?

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

in php.ini
extension=php_openssl.dll
should be there to be more specific.

@Altroo
Copy link

Altroo commented Oct 6, 2017

I don't know what icon you are talking about & yeah i'm testing on xampp, & in php.ini that wasn't enabled so i enabled it but didn't work.
actually i see that error everywhere not just when using french.

sans titre

@Altroo
Copy link

Altroo commented Oct 6, 2017

I think the project is broken or something now when i'm logged out i can't log in lol.
Never mind that but thanks for your help anyway.

@Reconix
Copy link
Contributor

Reconix commented Oct 6, 2017

Ok so I just downloaded the latest version of Bonfire and the latest version of XAMPP and all looks good without any problems.

Double checked php.ini and openSSL is indeed on by default.

So I'm not sure what else to suggest other than trying to install bonfire and xampp again.
Let me know how you can get on.

@carcagi
Copy link

carcagi commented Nov 8, 2017

Hi, I am having the same issue, you can access it here (https://new.quikdrawers.com/public/). The server has openssl enabled and even has the certificate in place. Any ideas on how to solve this?

@silverark
Copy link
Contributor

@carcagi I can't see the error on that page. Have you fixed/solved it since?

@cijagani
Copy link

cijagani commented Dec 27, 2017

@Altroo @kalyan2k it is completability issue with php 7.0

mcrypt_create_iv is DEPRECATED

This function was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0.
http://php.net/manual/en/function.mcrypt-create-iv.php

you can use random_bytes() as an alternative.
http://php.net/manual/en/function.random-bytes.php

follow these steps to resolve error.

  1. find file security.php location. it should be like this (bonfire.dev\bonfire\ci3\core\Security.php)
  2. find get_random_bytes() method
  3. find mcrypt_create_iv($length, MCRYPT_DEV_URANDOM) and replace with random_bytes($length)
  4. that's it 👍

@kalyan2k
Copy link

Thank you @truelineinfotech

1 similar comment
@locvfx
Copy link

locvfx commented Dec 28, 2017

Thank you @truelineinfotech

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

No branches or pull requests

8 participants