Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SPresnac's avatar

"Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length() " after upgrade to php8!?

I just upgraded from php 7.4.15 to php 8.0.3, fixed some library issues and now i am stuck with this error:

Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()

when i call my laravel (8+) site. Did anybody had this error and solved it?

OS: Windows (it shouldn't make a diff, but you never know).

0 likes
5 replies
SPresnac's avatar

When I switch to the app directory and execute in tinkerwell

openssl_cipher_iv_length('AES-128-CBC')

I get this result

=> 16

neilstee's avatar

@spresnac trying running composer update and make sure extension=php_openssl.dll is enabled in your php.ini file.

If that doesn't help, try restarting your apache/nginx server as well.

1 like
neilstee's avatar

And based on your Tinkerwell, it looks like it's working fine, somewhere in your apache config is the culprit.

Make sure your apache is loading the correct PHP extension in

extension_dir = "C:\php extension path\ext"

and of course, make sure you restart your apache.

1 like
SPresnac's avatar
SPresnac
OP
Best Answer
Level 11

THAT gave the clue, thank you.

To all: It all lies in the apache/conf/extra/httpd-xampp.conf.

Find LoadFile "D:/www/php/php7ts.dll" and replace it with LoadFile "D:/www/php/php8ts.dll"

Find LoadModule php7_module "D:/www/php/php7apache2_4.dll" and replace it with LoadModule php_module "D:/www/php/php8apache2_4.dll" (note that there are 2 changes, one in the dll name, the other is php_module).

After restarting apache it works 🥳🥳🥳

A big thanks!!!

1 like

Please or to participate in this conversation.