phpcms转到https后无法注册问题的解决

phpcms modules member classes client class php中361行增加$port=!emptyempty($matches[& 39;port& 39;])?$matches[& 39;port& 39;]:(str

phpcms/modules/member/classes/client.class.php 
中361行增加

  1. $port = !emptyempty($matches['port']) ? $matches['port'] : ( strtolower($matches['scheme'])=='https' ? 443 : 80 ); 

中386行

  1. $fp = @fsockopen(($ip ? $ip : $host), $port$errno$errstr$timeout); 

替换为

  1. $contextOptions = array
  2.     'ssl' => array
  3.         'verify_peer' => false, 
  4.         'verify_peer_name' => false 
  5.     ) 
  6. ); 
  7.  
  8. //如果有签名的证书 
  9. //$contextOptions = array( 
  10. //    'ssl' => array( 
  11. //        'verify_peer' => true,  
  12. //        'cafile' => '/path/to/cacert.pem', 
  13. //        //'CN_match' => 'indexroot.net', // 匹配域名 
  14. //        'ciphers' => 'HIGH:!SSLv2:!SSLv3', 
  15. //        'disable_compression' => true, 
  16. //    ) 
  17. //); 
  18.  
  19. $context = stream_context_create($contextOptions); 
  20. $fp = stream_socket_client("ssl://{$host}:{$port}"$errno$errstr$timeout, STREAM_CLIENT_CONNECT, $context); 
phpcms 文章列表页调用组图标签写法 一些不好记却很好用的 CSS 属性
Tags:  
联系我们

Contact us

青岛

电话:133 9639 4503

地址:青岛市市南区三度空间2309

诸城

电话:133 0646 1744

地址:诸城市繁荣东路74号楼12F

×