i am trying to make a secure log in and registration page using php. i found a code on internet that helped me alot but while debugging and clicking on the button register, an error appeared saying "Fatal error: Call to undefined function openssl_random_pseudo_bytes() " when i went to the specified line in the code i found this : "$random_salt = hash('sha512', uniqid(openssl_random_pseudo_bytes(16), TRUE));
" i think i have the 5.3.8 version of php i downloaded the php 5.5.9 thread but it think i didn't install it well. I am on windows. Can alone help me please? I am still a beginner in these stuffs Thanks in advance
You need to enable the open_ssl
extension on your PHP.ini
Open your PHP.ini , search for this line
;extension=php_openssl.dll
Remove the ;
before the line , save the file and restart your webserver and you are good to go.
Create a simple test file like test.php
, add <?php phpinfo();
and execute it. Search for Loaded Configuration File
line and see the path next to that line.
In order to use OpenSSL function you need to install the OpenSSL extension for php. Documentation