0

I'm trying to set up a local WordPress back-end/NextJS front-end website using these instructions.

Ensuring I have the dependencies installed, I follow the instructions to install Composer, but when running php composer-setup.php I receive:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

My VS Code has PHP located:

"php.validate.executablePath": "C:/Users/Steve/AppData/Local/Programs/Local/resources/extraResources/lightning-services/php-8.1.9+8/bin/win64/php.exe"

& checking C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\conf\php.ini: I see:

extension=php_openssl.dll

is uncommented.

Checking http://mysite-nextjs.local/local-phpinfo.php I see:

PHP Version 8.1.9
SSL Version OpenSSL/1.1.1q
  • I'm assuming this site uses PHP 8.1.9 from C:/Users/Steve/AppData/Local/Programs/Local/resources/extraResources/lightning-services/php-8.1.9+8/bin/win64/php.exe listed above,
  • and I know openssl.conf lives at C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\bin\win64\extras\ssl\openssl.cnf.
  • Because VS Code is using this same php.exe, would it be safe to assume it knows where OpenSSL is?
  • I did find C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\bin\win64\php.ini-development had ;extension=openssl, uncommenting it did not resolve the error,
  • and C:\Users\Steve\Local Sites\mysite-nextjs\conf\php\php.ini.ibs already had extension=php_openssl.dll uncommented.

How do I allow VS Code to use Local WP's PHP with Open SSL enabled?

Using Local WP 6.7.2 on Windows 11 64-bit.

Steve
  • 2,066
  • 13
  • 60
  • 115
  • Please share more details. How is your problem related to Wordpress or localhost? What have you tried to resolve it? Are you sure that the extension got enabled properly? – Nico Haase May 27 '23 at 13:34
  • [This answer](https://superuser.com/a/1051443/34252) solved it for me. – Steve May 27 '23 at 14:20

0 Answers0