OK, so I thought I’d take a look at Laravel PHP Framework (http://laravel.com/) today, since I’m looking for new frameworks to play with, and lot’s of people seem to be raving about it.
The laravel website has a 5 minute Quickstart tutorial (http://laravel.com/docs/quick) which I started to make my way through, but didn’t get very far before encountering an error. I had downloaded a copy of the laravel Github repository (https://github.com/laravel/laravel/archive/master.zip) and extracted it into a project folder in my WAMP installation, then I installed Composer (http://getcomposer.org/), a nifty dependancy management script, and then ran the “
composer install” command in the root of my new project, only to be confronted with the error “You must enable the openssl extension to download files via https”.
I checked my WAMP configuration from the WAMP tray icon > PHP > PHP extentions, and php_openssl was already checked…odd, I thought. So, a quick bit of Googling later I discovered that PHP apparently uses a different config when run over the command line, than it does when it’s run as CGI or an Apache module.
This is a quick fix though, first find the php.ini file, which in my case was at “
C:\wamp\bin\php\php5.3.13\php.ini” (your WAMP PHP version will likely be different, but just navigate to the version number you have), and then search for “
openssl” and you should find the line has a semi-colon at the beginning like this “
;extension=php_openssl.dll“, which means the line is commented-out or disabled. Just remove the semi-colon so the line now looks like this “
extension=php_openssl.dll” then save and close the php.ini file. You should probably restart your WAMP server too.
Your Composer installation should now work like a charm. Fire up your Command Prompt, navigate to your laravel project root, and type in “composer install” once again – hey presto.