13

我今天在我的 Windows 7 计算机上安装了最新的 WAMP(来自wampserver.com )。

我已启用 SSLPHP > PHP Extensions > php_openssl

Apache > Apache Modules > open_ssl

但是当我尝试使用 https:// 访问任何内容时,我得到“问题加载页面”。apache_error.log 说

[Thu Jun 27 16:25:08.622056 2013] [ssl:warn] [pid 4812:tid 356] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1e 11 Feb 2013, version currently loaded is OpenSSL 1.0.1d 5 Feb 2013) - may result in undefined or erroneous behavior


[Thu Jun 27 16:25:08.973076 2013] [ssl:warn] [pid 4812:tid 356] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1e 11 Feb 2013, version currently loaded is OpenSSL 1.0.1d 5 Feb 2013) - may result in undefined or erroneous behavior


[Thu Jun 27 16:25:09.356098 2013] [ssl:warn] [pid 4812:tid 356] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]


[Thu Jun 27 16:25:09.365099 2013] [mpm_winnt:notice] [pid 4812:tid 356] AH00455: Apache/2.4.4 (Win64) OpenSSL/1.0.1d PHP/5.4.12 configured -- resuming normal operations

[Thu Jun 27 16:25:09.365099 2013] [mpm_winnt:notice] [pid 4812:tid 356] AH00456: Server built: Feb 22 2013 22:08:37

[Thu Jun 27 16:25:09.365099 2013] [core:notice] [pid 4812:tid 356] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.4\\bin\\httpd.exe -d C:/wamp/bin/apache/Apache2.4.4'

[Thu Jun 27 16:25:09.366099 2013] [mpm_winnt:notice] [pid 4812:tid 356] AH00418: Parent: Created child process 3452

[Thu Jun 27 16:25:09.664116 2013] [ssl:warn] [pid 3452:tid 248] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1e 11 Feb 2013, version currently loaded is OpenSSL 1.0.1d 5 Feb 2013) - may result in undefined or erroneous behavior

[Thu Jun 27 16:25:09.954132 2013] [ssl:warn] [pid 3452:tid 248] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 1.0.1e 11 Feb 2013, version currently loaded is OpenSSL 1.0.1d 5 Feb 2013) - may result in undefined or erroneous behavior

[Thu Jun 27 16:25:10.327154 2013] [ssl:warn] [pid 3452:tid 248] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]


[Thu Jun 27 16:25:10.339154 2013] [mpm_winnt:notice] [pid 3452:tid 248] AH00354: Child: Starting 150 worker threads.
4

6 回答 6

37

php.ini 的路径 [如果你想要作曲家的话] 是 C:\wamp\bin\php\php5.4.x\php.ini 。如果您通过 Wamp 托盘图标导航,此文件与您拥有的文件不同

正如@milesstewart88 所说,去那里删除分号

于 2013-11-01T12:09:11.497 回答
25

只需取消注释 php.ini 文件中的 openssl 扩展名即可。

例如。;extension=php_openssl.dll

去掉分号,就是这样。

extension=php_openssl.dll

那应该行得通;它对我有用。

于 2013-06-29T11:47:46.610 回答
23

带有 apache 2.4.4 的 Wampserver 发布时带有错误的 openssl 文件。所有要做的事情是:从这里下载并安装 1.0.1e openssl:http: //slproweb.com/products/Win32OpenSSL.html

然后在安装目录中找到这些文件:

bin\openssl.cfg

bin\libeay32.dll

bin\ssleay32.dll

bin\openssl.exe

停止 apache 服务器。首先,保存它们的备份。然后在你的 apache 目录中覆盖这些文件:

conf\openssl.cnf->在这里重命名cfg

bin\libeay32.dll

bin\ssleay32.dll

bin\openssl.exe

重新启动服务器。解决了。

于 2013-07-18T08:38:52.930 回答
4

在带有Apache 2.4.4的Wampserver上,这对我有用: 假设您已经使用 SSL 密钥和证书创建了一个目录,例如:
c:/wamp/OpenSSL

httpd.conf中取消注释:

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so  
LoadModule log_config_module modules/mod_log_config.so  
LoadModule setenvif_module modules/mod_setenvif.so  
LoadModule ssl_module modules/mod_ssl.so

# Secure (SSL/TLS) connections
<IfModule ssl_module>
    Include conf/extra/httpd-ssl.conf
</IfModule>

httpd-ssl.conf中编辑:

SSLSessionCache "shmcb:c:/wamp/OpenSSL/logs/ssl_scache(512000)"  

<VirtualHost _default_:443>
    DocumentRoot "c:/wamp/www" 
    ServerName localhost:443
    ErrorLog "c:/wamp/logs/error.log"
    TransferLog "c:/wamp/logs/access.log"
    SSLCertificateFile "c:/wamp/OpenSSL/certs/server.crt"
    SSLCertificateKeyFile "c:/wamp/OpenSSL/certs/server.key"
    <Directory "c:/wamp/www">
        SSLOptions +StdEnvVars
    </Directory>
    CustomLog "c:/wamp/logs/ssl_request.log" \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

php.ini中取消注释:extension=php_openssl.dll

于 2014-03-19T21:10:13.703 回答
1

看看我是如何做到这一点的..

uncomment below line from <WEBroot>/bin/apache/Apache2.x/conf/httpd.conf

LoadModule ssl_module modules/mod_ssl.so

           &

Include conf/extra/httpd-ssl.conf

将您的证书和密钥放在一个单独的文件夹中,例如“wwwssl”

AND GOT TO <WEBroot>/bin/apache/Apache2.x/conf/extra/httpd-ssl.conf

为所需的服务器创建一个虚拟主机,例如:下面

<VirtualHost _default_:443>
    DocumentRoot "<WEBroot>/www/"
    ServerName localhost
    SSLEngine on
    SSLCertificateFile "<WEBroot>/wwwssl/webserver.cert"
    SSLCertificateKeyFile "<WEBroot>/wwwssl/webserver.key"

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>
</VirtualHost>                                  
于 2014-02-03T11:53:16.850 回答
1

就像milesstewart88 所说 - 在php.ini 文件中取消注释行extension=php_openssl.dll。

从 wamp 菜单中这样做是行不通的——这可能会误导真正的问题。

于 2014-10-02T09:40:25.200 回答