0

Getting the following message when attempting to run PhpMyAdmin 5.1.1 within EasyPHP Devserver 17. This is with MySQL 8.0 and PHP 7.4:

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

I have checked the php.ini and it contains extension=openssl without comment.

Full results from php -i cmd on my Windows 10 machine.

UPDATE

The above error is produced when attempting to open PhpMyAdmin 5.1.1 from EasyPHP Devserver dashboard.

Also, php -i cmd shows:

Configuration File (php.ini) Path =>
Loaded Configuration File => E:\Projects\PHP Migration\EasyPHP-Devserver-17\eds-binaries\php\php7427vc15x86x220629181102\php.ini
...

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1l  24 Aug 2021
OpenSSL Header Version => OpenSSL 1.1.1l  24 Aug 2021
Openssl default config => C:\Program Files (x86)\Common Files\SSL/openssl.cnf

Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value

C:\Program Files (x86)\Common Files\SSL/openssl.cnf does not exist. I guess that might be a problem?

The same error occurs with this PHP script:

if (!(PHP_VERSION_ID >= 70103)) {
    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.';
}

$missingExtensions = array();
extension_loaded('hash') || $missingExtensions[] = 'hash';
extension_loaded('iconv') || $missingExtensions[] = 'iconv';
extension_loaded('json') || $missingExtensions[] = 'json';
extension_loaded('mysqli') || $missingExtensions[] = 'mysqli';
extension_loaded('openssl') || $missingExtensions[] = 'openssl';
extension_loaded('pcre') || $missingExtensions[] = 'pcre';
extension_loaded('xml') || $missingExtensions[] = 'xml';

if ($missingExtensions) {
    $issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
}

if ($issues) {
    echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues);
    exit(104);
}

Any ideas how to fix this?

IlludiumPu36
  • 4,196
  • 10
  • 61
  • 100
  • 1
    Please run `composer -vvv show --platform` and add the output to your question. That _"command lists all PHP extensions available on your system"_ ([ref](https://getcomposer.org/doc/04-schema.md#package-links)). And please also edit in which Composer command resulted in the error you're reporting as otherwise it is not very clear what you did (in terms of asking the question, what you face looks like a configuration issue to me and more context can only be helpful for guidance). – hakre Jul 04 '22 at 09:24
  • Might seem like a stupid question, but how do I access the shell/CLI with EasyPHP Devserver? – IlludiumPu36 Jul 06 '22 at 01:00
  • or how do I run composer -vvv show --platform without a shell? Can I use cmd from Windows and use a path to the command? Eg H:\>E:\Projects\PHP Migration\EasyPHP-Devserver-17... – IlludiumPu36 Jul 06 '22 at 03:13
  • Does this answer your question? [Composer Warning: openssl extension is missing. How to enable in WAMP](https://stackoverflow.com/questions/14062055/composer-warning-openssl-extension-is-missing-how-to-enable-in-wamp) – Martin Zeitler Jul 06 '22 at 04:22
  • No, not really. I have checked and there is only the one "php.ini" with EasyPHP Devserver 17, which is in the eds-binaries/php folder. There is not one in the Apache folder. As I stated in the OP, extension=openssl is not commented out, which most of the answers suggested to check. – IlludiumPu36 Jul 06 '22 at 04:48
  • @IlludiumPu36: This then is perhaps an issue with the setup of Easyphp Devserver. I don't know it. When I remember back in the days there was another php.ini for the cli executable. Perhaps in that one it is missing? But thats just a guess, as written, neither EasyPHP Devserver nor a Windows system here. – hakre Jul 06 '22 at 06:51
  • @hakre I have run a search in the EasyPHP directory where I have it installed. There is only one "php.ini" file and I know it's the one in use as I have made changes to it in the past. extension=openssl is active in that file. – IlludiumPu36 Jul 06 '22 at 07:14
  • 1
    @IlludiumPu36: Yes, then just from the error it looks to me like PHP on the command-line as invoked by EasyPHP Devserver is unable to load the openssl extension. Check the [`extension_dir`](https://www.php.net/manual/en/ini.core.php#ini.extension-dir) setting contains the recommended _absolute_ path (if relative this could be an issue). You could also try to locate the PHP executable EasyPHP Devserver is using within a Windows `cmd` prompt and then check the configuration there, however I don't know about how EasyPHP Devserver is configuring and using it. – hakre Jul 06 '22 at 07:26
  • @hakre This is in the php.ini: extension_dir = "E:\Projects\PHP Migration\EasyPHP-Devserver-17\eds-binaries\php\php7427vc15x86x220629181102\ext" in that directory is php_openssl.dll – IlludiumPu36 Jul 07 '22 at 04:08
  • @hakre see also updated OP – IlludiumPu36 Jul 07 '22 at 08:37
  • 1
    @IlludiumPu36: "php -i cmd" sounds like you're executing php on the commandline (cmd on your windows box?). That is the PHP CLI SAPI. When PHPMyAdmin runs, it runs within the PHP SAPI of the webserver. It can have a different configuration compared to CLI SAPI. Maybe it has some `phpinfo();` capability? That is similar to `php -i` on the command line. It would also show which `.ini` files are loaded and if openssl is enabled (or not). Not sure if the _Openssl default config_ must be available (in general). It could be its just used if it exists, and it would not enable or disable the php ext. – hakre Jul 07 '22 at 21:55
  • Not an answer to his OP, but I just went with Laragon. No problems once I sorted out the MySQL 8 upgrade https://stackoverflow.com/questions/70784795/how-to-solve-mysql-service-can-not-start-error-in-laragon-5-0-0-when-adding-a/72907554#72907554 – IlludiumPu36 Jul 08 '22 at 06:43

0 Answers0