Apache2 在使用 wsf/php 时重新启动

发布于 2024-12-01 15:47:36 字数 3286 浏览 1 评论 0原文

我对 WSF/PHP 框架还有另一个问题。大多数时候(并非总是如此,但仍然如此),当我运行脚本时,它会以丢失连接结束。没有错误页面或任何内容,只是与主机连接时出错(通过 localahost)。

这是我的代码:

<?php
    $server_location = "https://some.address";
    $clientCert_location = "clientCert.pem";
    $CACert_location = "CACert.cer";
    $passphrase = "some.password";
    $request = file_get_contents("./requests/example.xml");
    $action = "some.action";

    $rec_cert = ws_get_cert_from_file($CACert_location);
    $pvt_key = ws_get_key_from_file($clientCert_location);
    $sec_token = new WSSecurityToken(array("privateKey" => $pvt_key,
                                           "receiverCertificate" => $rec_cert));

    $client = new WSClient(array("useSOAP" => "1.1",
                                 "policy" => new WSPolicy(array()),
                                 "securityToken" => $sec_token,
                                 "to"=>$server_location,
                                 "action" => $action,
                                 "CACert" => $CACert_location));

    try {
        $response = $client->request($request);
    } catch (Exception $e) {
        if ($e instanceof WSFault) {
            $response = "Soap Fault: ".$e->Code."\n";
        } else {
            $response = "Message = ".$e->getMessage()."\n";
        }
    }
?>

这是来自 apache 的错误日志:

[Mon Aug 29 11:13:41 2011] [info]  Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:41 2011] [info]  [rampart] rampart_mod initialized
[Mon Aug 29 11:13:41 2011] [info]  [rahas]Rahas module initialized
[Mon Aug 29 11:13:41 2011] [error] ..\..\axiom\src\om\om_document.c(102) Unable to get root node
[Mon Aug 29 11:13:41 2011] [info]  Starting addressing out handler
[Mon Aug 29 11:13:41 2011] [warning] ..\..\src\core\context\msg_ctx.c(1384) RampartClientConfiguration not set in message context
[Mon Aug 29 11:13:41 2011] [info]  [rampart][rampart_signature] No parts specified or specified parts can't be found for Signature.
OPENSSL_Uplink(100EC020,08): no OPENSSL_Applink
[Mon Aug 29 11:13:41 2011] [notice] Parent: child process exited with status 1 -- Restarting.
[Mon Aug 29 11:13:41 2011] [info]  [rampart] rampart_mod shutdown
[Mon Aug 29 11:13:41 2011] [info]  [rahas] Rahas module shutdown
[Mon Aug 29 11:13:43 2011] [notice] Apache/2.2.19 (Win32) PHP/5.3.6 configured -- resuming normal operations
[Mon Aug 29 11:13:43 2011] [notice] Server built: May 20 2011 17:39:35
[Mon Aug 29 11:13:43 2011] [notice] Parent: Created child process 4636
[Mon Aug 29 11:13:44 2011] [info]  Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:44 2011] [info]  [rampart] rampart_mod initialized
[Mon Aug 29 11:13:44 2011] [info]  [rahas]Rahas module initialized
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Child process is running
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Acquired the start mutex.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting 64 worker threads.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting thread to listen on port 80.

非常感谢帮助;)

编辑: 我明白了。我的 PATH 缺少 .../php/ext 位置,因此无法找到 wsf.dll。然而,这并不是我的问题的结束。更多内容即将推出...;)

编辑2: 不...不是这样:(

I have another problem with framework WSF/PHP. Most of the time (not always, but still), when i run my script it ends with lost connection. There's no error page or anything, just error connecting with host (via localahost).

Here's my code:

<?php
    $server_location = "https://some.address";
    $clientCert_location = "clientCert.pem";
    $CACert_location = "CACert.cer";
    $passphrase = "some.password";
    $request = file_get_contents("./requests/example.xml");
    $action = "some.action";

    $rec_cert = ws_get_cert_from_file($CACert_location);
    $pvt_key = ws_get_key_from_file($clientCert_location);
    $sec_token = new WSSecurityToken(array("privateKey" => $pvt_key,
                                           "receiverCertificate" => $rec_cert));

    $client = new WSClient(array("useSOAP" => "1.1",
                                 "policy" => new WSPolicy(array()),
                                 "securityToken" => $sec_token,
                                 "to"=>$server_location,
                                 "action" => $action,
                                 "CACert" => $CACert_location));

    try {
        $response = $client->request($request);
    } catch (Exception $e) {
        if ($e instanceof WSFault) {
            $response = "Soap Fault: ".$e->Code."\n";
        } else {
            $response = "Message = ".$e->getMessage()."\n";
        }
    }
?>

And here's error log from apache:

[Mon Aug 29 11:13:41 2011] [info]  Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:41 2011] [info]  [rampart] rampart_mod initialized
[Mon Aug 29 11:13:41 2011] [info]  [rahas]Rahas module initialized
[Mon Aug 29 11:13:41 2011] [error] ..\..\axiom\src\om\om_document.c(102) Unable to get root node
[Mon Aug 29 11:13:41 2011] [info]  Starting addressing out handler
[Mon Aug 29 11:13:41 2011] [warning] ..\..\src\core\context\msg_ctx.c(1384) RampartClientConfiguration not set in message context
[Mon Aug 29 11:13:41 2011] [info]  [rampart][rampart_signature] No parts specified or specified parts can't be found for Signature.
OPENSSL_Uplink(100EC020,08): no OPENSSL_Applink
[Mon Aug 29 11:13:41 2011] [notice] Parent: child process exited with status 1 -- Restarting.
[Mon Aug 29 11:13:41 2011] [info]  [rampart] rampart_mod shutdown
[Mon Aug 29 11:13:41 2011] [info]  [rahas] Rahas module shutdown
[Mon Aug 29 11:13:43 2011] [notice] Apache/2.2.19 (Win32) PHP/5.3.6 configured -- resuming normal operations
[Mon Aug 29 11:13:43 2011] [notice] Server built: May 20 2011 17:39:35
[Mon Aug 29 11:13:43 2011] [notice] Parent: Created child process 4636
[Mon Aug 29 11:13:44 2011] [info]  Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:44 2011] [info]  [rampart] rampart_mod initialized
[Mon Aug 29 11:13:44 2011] [info]  [rahas]Rahas module initialized
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Child process is running
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Acquired the start mutex.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting 64 worker threads.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting thread to listen on port 80.

Help will be much appreciated;)

EDIT:
I figured that out. My PATH was missing the .../php/ext location, so wsf.dll couldn't be found. However, it's not the end of my problem. More are comming... ;)

EDIT2:
Nope... It wasn't it:(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花辞树 2024-12-08 15:47:36

如果有人对它是如何结束的感兴趣,我通过将 apache-httpd 升级到 2.2.21 并使用 wse-php 而不是 wsf-php

If anyone would be interested in how did it end, i solved the problem by upgrading apache-httpd to 2.2.21 and using wse-php instead of wsf-php.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文