Loading...
X

Error “Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli, openssl” (SOLVED)

This post explains the causes of the error and how to fix it.

When self-installing the web server on Windows, for example, following the guide “How to install Apache web server with PHP, MySQL and phpMyAdmin on Windows”, when trying to open the phpMyAdmin address, an error may occur:

Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli, openssl

It occurs in the latest version of phpMyAdmin (for example, in 5.1.1) in the following cases:

1.

The following line is not added to the php.ini file:

extension_dir = "C:\Server\bin\PHP\ext\"

Open the php.ini file and double-check the value of the extension_dir directive. Depending on the folder where you are installing, you may have a different path instead of "C:\Server\bin\PHP\ext\". This value is correct if you install according to the instructions, the link to which is given above.

2.

The following line are commented in the php.ini file:

extension=mysqli
extension=openssl

Check your php.ini file to make sure these lines are uncommented.

3.

Your system for some reason does not use the settings from the php.ini file, for example, because the php.ini file is named incorrectly.

You can check this by running at the command line:

C:\Server\bin\PHP\php --ini

The output should include the path to the file C:\Server\bin\PHP\php.ini. If it is not, you may not have renamed the file to php.ini or named it php.ini.txt or something.

4.

All the settings in the php.ini file are correct, but the web server has not been restarted, which prevented the settings from being applied.

To restart the Apache web server, run the following command (you may have a different path to the executable file):

c:\Server\bin\Apache24\bin\httpd.exe -k restart

Alternatively, restart your computer.

Conclusion

You can think of more exotic reasons, for example, when copying the PHP executable files, the “ext” folder was not copied. But the essence is always the same: PHP is not configured to use the extensions mysqli, openssl – that is, exactly what the error says.


Leave Your Observation

Your email address will not be published.