New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
mcrypt for directadmin/cloudlinux with php7.x
agentmishra
Member, Host Rep
in Help
hi
incase i, as a customer, request you to install and enable mcrypt, what shall a service provider do?
one of the service providers, i have a reseller service with, my client requires mcrypt
the service provider says "We have to run our servers to support hundreds of Resellers and we will continue to run our servers with maximum compatibility in mind"
and seems like, is not willing to install/enable mcrypt
in my servers, i have it installed/enabled for php7.x, but due to some constraints, i have the client hosted on this reseller hosting
let me know if enabling it will be a big issue...
thanks
Comments
Move them to your server. If they say no, it’s not worth it trying to bypass it, which I am pretty sure is impossible anyway.
Depending on the PHP version, you should be able to install/enable Mcrypt using the PHP selector option (since the host is using cloudlinux).
Them using CloudLinux does not necessarily mean they enable altphp and the selector accordingly. While it makes no sense (to me), I have seen it happen...
True and fair! Can’t assume anything these days.
Polyfill
Isn't the real answer to stop using it?
" The mcrypt extension has been abandonware for nearly a decade now, and was also fairly complex to use. It has therefore been deprecated in favour of OpenSSL, where it will be removed from the core and into PECL in PHP 7.2. "
you mean to say, i should ask the client to get the script changed for him to get hosting under me?
I mean, that’s the best idea. No one should be using scripts that has outdated code. Long term headache.
You can have mcrypt natively on php7.1.x, for php7.2.x and above, you should use the polyfill given above or use pecl but I'm not sure how that goes with directadmin or cloudlinux etc..
Assuming it's Laravel 4 (mcrypt is must for Laravel 4 and Laravel is a popular PHP framwork), it can easily be changed by simply altering this line (make a fork, update the file and use that branch instead):
https://github.com/laravel/framework/blob/4.2/src/Illuminate/Foundation/start.php#L27-L32
I'd require the polyfill on my project as dependency and remove this check (or alter it like it checks an mcrypt-specific constant.
What's next? Should I stop using Windows XP too?
yeah...
thats a cool idea!!! else use windows10 in 512mb ram and enjoy like in heaven...
Would mcrypt_compat work?
https://github.com/phpseclib/mcrypt_compat