2011-08-29 71 views
0

我有框架WSF/PHP的另一個問題。大多數時候(並不總是,但仍然),當我運行腳本時,它以丟失的連接結束。沒有錯誤頁面或任何東西,只是錯誤連接主機(通過localahost)。Apache2重新啓動時使用wsf/php

這裏是我的代碼:

<?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"; 
     } 
    } 
?> 

下面是錯誤日誌從阿帕奇:

[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. 

幫助將非常感激;)

編輯: 我想通了這一點。我的路徑缺少.../php/ext位置,所以無法找到wsf.dll。但是,這不是我的問題的結束。更多正在添加有...;)

EDIT2: 都能跟得上......這不是它:(

+0

斜槓這裏看起來像它可能是罪魁禍首 '找不到路徑d:\ Aplikacje \ WSF-PHP-2.1.0 \ wsf_c/services' – mraaroncruz

+0

我不確定這是否是這個問題。正如我所說的,該腳本不時地在不改變配置的情況下工作。 – Moyshe

回答

1

如果有人有興趣在如何做到的結束,我通過升級Apache的問題解決了-httpd至2.2.21,並使用wse-php代替wsf-php