0

SYSTEM:

I have Windows 10/x64, Apache24, MySQL 8.0, PHP 7.2.10

PHP CODE:

$conn = mysqli_connect('localhost', 'user', 'test123', 'ninja_project');
if (!$conn) {echo "Connection error:" . mysqli_connect_error();}

ERRORS:

Warning: mysqli_connect(): PHP was built without openssl extension, can't send password encrypted in C:\Users\User\www\phptutorial\ninjapizza\index.php on line 3

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'user'@'localhost' (using password: YES) in C:\Users\User\www\phptutorial\ninjapizza\index.php on line 3 Connection error:Access denied for user 'user'@'localhost' (using password: YES)

I DID:

  1. Checked solution through same topics already discussed on stackoverflow, but found nothing helpful in my case.
  2. Enabled openssl in php.ini extension=openssl.dll
  3. Specified directory extension_dir = "c:\php\ext"
  4. Checked openssl status through CMD '''php -i''' - openssl support => enabled
  5. Checked openssl modul through CMD '''php -m''' - got openssl in list
  6. Checked localhost/index.php - openssl enabled
  7. Checked file php-cli.ini on my PC - don't have one
  8. I tried to rename $conn = mysqli_connect('localhost' to $conn = mysqli_connect('127.0.0.1'. Doesn't work. Same problem.
  9. Granted All privileges to User.

QUESTIONS:

What else I can do to eliminate this issue? I have file named openssl.cnf in Apache24 with default configuration status. Maybe I should do something inside this file to solve the problem? Please help!

Damir Bai
  • 11
  • 2

0 Answers0