【问题标题】:PHP 5.3.8 Wordpress CURL Intermittent ErrorPHP 5.3.8 Wordpress CURL 间歇性错误
【发布时间】:2012-02-06 13:41:06
【问题描述】:

我将我的 IIS 7.5 Web 服务器从 PHP 5.2.17 升级到 PHP 5.3.8。 这样做之后,我的 Wordpress 安装开始间歇性地产生 500 个错误:

HTTP 错误 500.0 - 内部服务器错误
C:\Program Files (x86)\PHP\v5.3\php-cgi.exe - FastCGI 进程意外退出

详细的错误信息

模块 FastCGIModule
通知 ExecuteRequestHandler
处理程序 PHP53_via_FastCGI
错误代码0x000000ff

我还在这台服务器上运行 Drupal 和 Zend Framework,它们都使用 CURL,但这些都没有产生错误。因此,我会说这是 CURL 的 Wordpress 实现所特有的。

我查看了 Windows 应用程序错误日志,发现以下错误:

错误应用程序名称:php-cgi.exe,版本:5.3.8.0,时间戳:0x4e537f4b
错误模块名称:php_curl.dll,版本:5.3.8.0,时间戳:0x4e537f64
异常代码:0xc0000005
故障偏移:0x00036864
错误进程 ID:0x378
错误的应用程序启动时间:0x01cccf17892cff0e
错误的应用程序路径:C:\Program Files (x86)\PHP\v5.3\php-cgi.exe
错误模块路径:C:\Program Files (x86)\PHP\v5.3\ext\php_curl.dll
报告 ID:ec31f1ab-3b0a-11e1-9d5f-005056b30014

【问题讨论】:

  • 你应该发布第二位作为答案。
  • 因为我是 Stack Overflow 的新手,所以 7 个小时都不能。现在完成。 ;)

标签: php wordpress curl iis-7.5 fastcgi


【解决方案1】:

这似乎是以下 PHP 错误的表现,在 5.3.7 中引入了新版本的 cURL: https://bugs.php.net/bug.php?id=60576

如果您不需要新 cURL 版本的新功能(例如从 php.ini 中指定的文件读取证书),请从 http://windows.php.net/downloads/releases/archives/ 下载相关的 PHP 5.3.6 Zip 文件并替换 ext\ php_curl.dll 与 PHP 5.3.6 版本。

如果您确实需要这些功能...这是一个悬而未决的问题。

希望这对某人有所帮助!

【讨论】:

    【解决方案2】:

    我也遇到了同样的问题。我的配置如下。

    Windows 7
    Wordpress 3.9.1(土耳其语)
    Apache 2.4.9 x86 VC11 (Windows Lounge 二进制文件)
    PHP 5.5.14 ts x86 VC11

    我正在使用代理。此外,我的代理需要身份验证。我发现文件wp-includes/class-http.php中的请求方法之一有问题。

    我通过替换下面的行解决了这个问题(行号是 1247)

    
        if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
    
            curl_setopt( $handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
            curl_setopt( $handle, CURLOPT_PROXY, $proxy->host() );
            curl_setopt( $handle, CURLOPT_PROXYPORT, $proxy->port() );
    
            if ( $proxy->use_authentication() ) {
                curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
                curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
            }
    
        }
    

    下面给出的行。

    
        if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
    
            $isPHP5 = version_compare(PHP_VERSION, '5.0.0', '>=');
    
            if ($isPHP5) {
                curl_setopt($handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
                curl_setopt($handle, CURLOPT_PROXY, $proxy->host());
                curl_setopt($handle, CURLOPT_PROXYPORT, $proxy->port());
            } else {
                curl_setopt($handle, CURLOPT_PROXY, $proxy->host() . ':' . $proxy->port());
            }
    
            if ($proxy->use_authentication()) {
                if ($isPHP5)
                    curl_setopt($handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
    
                curl_setopt($handle, CURLOPT_PROXYUSERPWD, $proxy->authentication());
            }
    
        }
    

    【讨论】:

      猜你喜欢
      • 2021-04-24
      • 2018-04-14
      • 2016-05-20
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多