1

I'm trying to install composer on my windows 7 using uwamp but i'm getting this message : the openssl extension is missing from the php version. I opened php_uwamp.ini and I did a copy and named to php.ini and changed php_uwamp.ini and php.ini to

;extension_dir = "ext"

to

extension_dir = "ext"

and

;extension=php_openssl.dll

to

extension=php_openssl.dll

in php bin\php\php-5.6.30-Win32-VC11-x86 and \bin\apache. But still having the same error message.

Bynd
  • 675
  • 1
  • 15
  • 40
  • forget to mention that i did a copy php_uwamp.ini and named to php.ini in the same folder – Bynd Mar 22 '17 at 08:42

1 Answers1

1

I had the same problem with Uwamp 3.1.0 and PHP 5.6.18 on Windows 7 x64.

Part of the solution is already answered here How to enable 'openssl' in UwAmp CLI?, but there is more :)

The problem with Uwamp (if we don't mention that they should already answer this thread, not us, the users :) ) is because it is using that custom php_uwamp.ini file and "normal" php.ini is missing from ../bin/php/php-xxx/ (still used by many PHP tools) and there is actually the php.ini file in ../bin/apache/php.ini file so I have solved the problem by using extensions path from that file.

The problem was the relative path of ext folder, so just put the absolute path and the problem should be solved (as is for me).

So to write exact steps:

  1. Locate Your UwAmp PHP "bin" folder of used PHP version (example C:/Uwamp/bin/php/php-5.6.18/)
  2. Locate "custom Uwamp" php_uwamp.ini file and duplicate it in same folder as php.ini
  3. Open that duplicated php.ini file and locate the following line:

;extension_dir = "ext" or ; extension_dir = "{PHPEXTPATH}"

  1. Now locate other already existing php.ini file in UwAmp Apache "bin" folder ((example C:/Uwamp/bin/apache/php.ini) and find the line with absolute path (example)

; extension_dir = "C:/UwAmp/bin/php/php-5.6.18/ext"

and use it into yours new file C:/UwAmp/bin/php/php-5.6.18/php.ini by uncommenting it and of course check is that absolute path correct.

So now your php.ini file in PHP "bin" folder should be something like this:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "{PHPEXTPATH}" 
; On windows:
;extension_dir = "ext"
extension_dir = "C:/UwAmp/bin/php/php-5.6.18/ext" 
Community
  • 1
  • 1