openssl_pkey_export(): cannot get key from parameter 1

In this tutorial im going to solve this erorr openssl_pkey_export(): cannot get key from parameter 1, this error is coming when try to generate public and private…