Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find the socket transport "ssl", CakePHP sending e-mail from shell

I am trying to send an e-mail from a cron using CakePHP shell but I am getting the following error "Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?: 0".

The problem is on local server only, I am using WAMP server and the php_openssl extension is correctly turned on. When I checked if the extension is being loaded from a controller everything seems fine but when I debug the shell action, the extension doesn't seem to be loaded. Furthermore when I try to send an e-mail from a controller, the e-mail is successfully sent. I am using gmail credentials thus the ssl requirement.

Thanks

like image 430
Kersten James Chircop Avatar asked Jun 21 '12 13:06

Kersten James Chircop


2 Answers

Solution found, it seems that you have to uncomment the line where the openssl extension can be found in (path to wamp)\bin\php(your php version)\php.ini since there are 2 php.ini files, enabling it only in the (path to wamp)\bin\apache(apache version)\bin\php.ini is not enough

like image 58
Kersten James Chircop Avatar answered Sep 22 '22 18:09

Kersten James Chircop


You need setting for php and apache

Check ssl_module in the Apache modules.
Check php_openssl in the PHP extensions.
like image 37
Quy Le Avatar answered Sep 26 '22 18:09

Quy Le