Just a quick post after something regarding wamp I completely forgot about.
I was using composer to install a fresh copy of Silverstripe 3, which worked fine until I tried to use composer to search packagist for related packages:
[code]composer search silverstripe[/code]
The console came back with the following error:
[code]
The “http://packagist.org/search.json?q=silverstripe” file could not be downloaded: failed to open stream: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?
[/code]
Using the wamp tray icon, I had enabled openssl under php extensions, and ssl under apache modules. My phpinfo was showing ssl under Registered Stream Socket Transports. So what was the problem?
Googling the error specific to wamp netted very little, until I came across a post that reminded me that wamp, by default, has two php.ini files. One located in /bin/php/[version]/, and another located in /bin/apache/[version]/bin. Apache (e.g. using php through a browser) uses the former ini file. Which is why I saw no problem in my phpinfo.
Depending on how your PATH is set on Windows, php-cli uses the latter ini file. On manually checking this file, I found that openssl was not enabled. And enabling it allowed the above composer command to work fine.
Note to self – Work out a unified php.ini usage so I only have to rely on one configuration.
Thanks for this. I was just using composer to install Zend Framework 2 on Windows (WAMP). I got the same error and indeed the php.ini in bin/php… was to blame.
This worked for me!
Big up for this. I completely forgot about the ‘second’ php.ini!
Thanks for posting this. I was going a little crazy.
Finally it worked for me.. Thanks a lot buddy 🙂
thanks dude
thanks a lot; was going crazy whole day…Perfectly worked for me.
Thank you guy!! You just save me 🙂
Thanks man, woked fine for me
Thanks
Thanks! This worked for me. I am working with Joomla 3 on a WAMP server and it was showing an error when checking for Joomla updates and extension updates. All fine now.
Thanks)))
worked for me for local joomla updates many thanks
Thanks!
how do i find the wamp tray icon..??
It’s down by your clock with all the other tray icons. Looks like a little ‘W’ with a square around it.
I’ve loaded your website in 4 completely different web browsers and I must say this blog loads a lot quicker then most.
Would you mind e-mailing me the name of your hosting company?
My personal email is: hughagar@gmail.com. I will even sign up
through your own affiliate link if you’d like.
Appreciate it
Thank you!!!
THANK YOU THANK YOU THANK YOU!
I’ve been going crazy trying to figure out my problem. Fixed it in 1 minute after reading your blog!
Thanks!
Brilliant solution. Finally I got it working. thank you !
Show man… works here.