I\'m having trouble enabling the socket transport \"ssl\" in PHP. When I run my script, I get the error:
Warning: fsockopen() [function.fsockopen]:
Ran into the same problem on Laravel 4 trying to send e-mail using SSL encryption.
Having WAMPServer 2.2 on Windows 7 64bit I only enabled php_openssl in the php.ini, restarted WAMPServer and worked flawlessly.
Did following:
Success!
After checking the log files and making sure the permissions on php_openssl.dll were correct, I googled the warning and found more things to try.
So I:
I'm not sure which of these fixed my problem, but it's definately fixed now! :)
I found these things to try on this page: http://php.net/manual/en/install.windows.extensions.php
Thanks for your help!
I was having problem in Windows 7 with PHP 5.4.0 in command line, using Xampp 1.8.1 server. This is what i did:
php.ini-production
to php.ini
(in C:\xampp\php\ folder)php.ini
and uncomment extension_dir=ext
.extension=php_openssl.dll
.After that it worked fine.
In XAMPP Version 1.7.4 server does not have extension=php_openssl.dll line in php ini file. We have to add extension=php_openssl.dll in php.ini file
I also ran into this issue just now while messing with laravel.
I am using wampserver for windows and had to copy the /bin/apache/apacheversion/bin/php.ini file to /bin/php/phpversion/php.ini
I am using XAMPP and came across the same error. I had done all those steps, added environmental variables path, copied the dll's every directory possible, to /php, /apache/bin, /system32, /syswow64, etc.. but still got this error.
Then after checking the apache error log, I noticed the issue with using brackets in path.
PHP: syntax error, unexpected '(' in C:\Program Files (other)\xampp\php\php.ini on line 707 0 server certificate does NOT include an ID which matches the server name
If you have installed the server in "Program Files (x86)" directory, the same error might occur due to the non-escaped brackets.
To fix this, open php.ini file and locate the line containing "include_path" and enclose the path with double quotes to fix this error.
include_path="C:\Program Files (other)\xampp\php\PEAR"