How to enable 'openssl' in UwAmp CLI?

ⅰ亾dé卋堺 提交于 2019-12-06 11:46:06

I had the same problem using UwAmp whilst trying to install composer, but found that I needed to add one more step before I could get it to work on my system.

After you identify the php_uwamp.ini file and copy it to the same directory as php.ini (as suggested) you need to find the following line

extension_dir = "{PHPEXTPATH}"

and change it to

extension_dir = "./ext"

The {PHPEXTPATH} variable is not interpreted when php is run under the CLI, and composer will complain about missing modules if you don't do this.

vee

While asking this question I already found the answer:

  1. Make sure openssl is enabled using the GUI
  2. Find uwamp-directory/php/php-x.x.x/php_uwamp.ini
  3. Copy it to php.ini in the same directory

Done.

If you use UwAmp, the installer Composer will struggle to find the php.ini file, even if you add the PHP folder to your PATH, because it just does not exist! The installer will display an error in the activation of the OpenSSL extension of PHP.

To resolve this issue, go to the folder of the PHP version used by UwAmp. Then copy the php_initial.ini file in the same folder and rename it to php.ini.

Then check the new php.ini the extension_dir variable is set to "ext", so you can install Composer normally.

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; On windows:
extension_dir = "ext"

original source for solution (in french): http://baudet.me/2014/10/installer-et-utiliser-composer-avec-uwamp/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!