I enabled php in my MAC osX and normal php codes works fine , but I got one strange error today
<?php
$hi = file_get_contents("https://ojooo.com");
echo $hi;
?>
For the above code i get below error on my local server.But above code is working fine on my Hosting.
Warning: file_get_contents() [function.file-get-contents]: SSL operation failed with code 1. OpenSSL Error messages: error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112) in /Library/WebServer/Documents/hi/index.php on line 2
Warning: file_get_contents() [function.file-get-contents]: Failed to enable crypto in /Library/WebServer/Documents/hi/index.php on line 2
Warning: file_get_contents(https://ojooo.com) [function.file-get-contents]: failed to open stream: operation failed in /Library/WebServer/Documents/hi/index.php on line 2
the normal file_get_content(https://yahoo.com); is working fine.Please some one help me
The problem is this site you try to call redirects to SSL(https). And then you need the
php_openssl.dllmodule. Otherwise its not working.Edit your active
php.inifind the line:;extension=php_openssl.dlland uncomment it.
Edit:
you can make an
phpinfo()and look at the top of the output. There you can see whichphp.inifile is loaded.