Before asking, i have to say that I have tried every similar question here on stack and elsewhere and failed.
I am unable to use composer because of this error:
requires ext-openssl * -> the requested PHP extension openssl is missing from your system.
I have xampp on ubuntu.
What I have tried:
- I have uncommented 
;extension=php_openssl.dllinphp.ini(both cli and normal) - did not work - Installed openssl through terminal outside of php - did not work
 - Check in 
phpinfo()ifopensslis loaded and activated 
- and few more like runing composer through 
php -c /opt/lampp/etc/php.ini composer.phar installwhere i get error 
PHP Warning:  PHP Startup: Unable to load dynamic library /usr/include/php5/ext/php_openssl.so - /usr/include/php5/ext/php_openssl.so: cannot open shared object file: No such file or directory in Unknown on line 0
- I have tried to change 
PATHinbashrc, no success either 
What i have found strange is the location of extensions...
In phpinfo() extension dir is /usr/include/php5/ext/ even though I have tried to specify another dir in php.ini and of course restart apache and still didnt show in phpinfo().
But in php-config command I get that extension dir is /usr/local/lib/php/extensions/no-debug-non-zts-20100525
I'm not sure if i have multiple php on system but I tried to look for php.ini files and only 2 came up.
/etc/php5/cli/php.ini
/opt/lampp/etc/php.ini
