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

**URL:** <https://community.localwp.com/t/how-do-i-allow-vs-code-to-use-local-wps-php-with-open-ssl-enabled/37131>\
**Category:** Archived Support\
**Created:** [May 25, 2023, 4:22am UTC](https://community.localwp.com/t/how-do-i-allow-vs-code-to-use-local-wps-php-with-open-ssl-enabled/37131 "2023-05-25T04:22:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.doig](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@s.doig](https://community.localwp.com/u/s.doig)\
**Post date:** [May 25, 2023, 4:22am UTC](https://community.localwp.com/t/how-do-i-allow-vs-code-to-use-local-wps-php-with-open-ssl-enabled/37131/1 "2023-05-25T04:22:09Z")

</div>

### Issue Summary

Following [the instructions to install Composer](https://getcomposer.org/download/), 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.

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

#### Replication

In VS Code’s `settings.json`, set:  
`"php.validate.executablePath": "C:/Users/[username]/AppData/Local/Programs/Local/resources/extraResources/lightning-services/php-8.1.9+8/bin/win64/php.exe",`

Execute the following in VS Code terminal (taken from [Composer](https://getcomposer.org/download/)):

```auto
php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php

```

This last command may generate the error:

> 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

#### System Details

- Which version of Local is being used? `6.7.2`.  
What Operating System (OS) and OS version is being used? `Windows 11 64-bit`.

---

<div class="post-metadata">

**Author:** ![s.doig](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@s.doig](https://community.localwp.com/u/s.doig)\
**Post date:** [May 28, 2023, 5:09am UTC](https://community.localwp.com/t/how-do-i-allow-vs-code-to-use-local-wps-php-with-open-ssl-enabled/37131/2 "2023-05-28T05:09:27Z")

</div>

I had to:

1. Copy `C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\bin\win64\php.ini-development` to `C:\Users\Steve\AppData\Local\Programs\Local\resources\extraResources\lightning-services\php-8.1.9+8\bin\win64\php.ini`
2. Uncomment the line `extension=php_openssl.dll`
3. Uncomment this line: `extension_dir = "ext"`

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [May 29, 2023, 5:10pm UTC](https://community.localwp.com/t/how-do-i-allow-vs-code-to-use-local-wps-php-with-open-ssl-enabled/37131/3 "2023-05-29T17:10:14Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
