php - WSO2 WSF/PHP 安装问题(需要 C 开发人员帮助)

标签 php c soap wso2 wsh

我正在尝试安装 WSO2 WSF/PHP 扩展以将 SOAP 与 WSSE 结合使用。 我在编译源代码时遇到了问题,我需要从他们的存储库中 checkout trunk (而不是标签 2.1),我修复了源代码中的 php 5.4 兼容性问题几次,最后一切都编译成功

但是当我尝试启用此扩展时,出现错误:

user@centos:~/wsf$ php -i | grep "wsf"                                                                                     
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/wsf.so' - /usr/lib/php5/20100525+lfs/wsf.so: undefined symbol: rampart_context_set_prv_key in Unknown on line 0
/etc/php5/cli/conf.d/20-wsf.ini,                                                                                                                     
PWD => /home/user/wsf                                                                                                                                
_SERVER["PWD"] => /home/user/wsf

我对源代码做了 grep 并发现了这个:

user@centos:~/wsf$ grep -r "rampart_context_set_prv_key" .                                                                         
./src/.svn/text-base/wsf_policy.c.svn-base:             rampart_context_set_prv_key(rampart_context, env, Z_STRVAL_PP(token_val));                   
./src/.svn/text-base/wsf_policy.c.svn-base:     if (rampart_context_set_prv_key_type (rampart_context, env, AXIS2_KEY_TYPE_PEM) == AXIS2_SUCCESS)    
Binary file ./src/modules/wsf.so matches
./src/wsf_policy.c:             rampart_context_set_prv_key(rampart_context, env, Z_STRVAL_PP(token_val));                                           
./src/wsf_policy.c:     if (rampart_context_set_prv_key_type (rampart_context, env, AXIS2_KEY_TYPE_PEM) == AXIS2_SUCCESS)                            
Binary file ./src/.libs/wsf.soT matches
Binary file ./src/.libs/wsf.so matches
Binary file ./src/.libs/wsf_policy.o matches
Binary file ./wsf_c/rampartc/src/util/.libs/librampart.so.0 matches
Binary file ./wsf_c/rampartc/src/util/.libs/librampart.a matches
Binary file ./wsf_c/rampartc/src/util/.libs/librampart.so.0.3.0 matches
Binary file ./wsf_c/rampartc/src/util/.libs/rampart_context.o matches
Binary file ./wsf_c/rampartc/src/util/.libs/librampart.so matches
./wsf_c/rampartc/src/util/rampart_context.c:rampart_context_set_prv_key(rampart_context_t *rampart_context,                                          
./wsf_c/rampartc/src/util/rampart_context.c:rampart_context_set_prv_key_type(rampart_context_t *rampart_context,                                     
./wsf_c/rampartc/src/util/rampart_context.c:rampart_context_set_prv_key_password(rampart_context_t *rampart_context,                                 
Binary file ./wsf_c/rampartc/src/util/rampart_context.o matches
./wsf_c/rampartc/include/rampart_context.h:    rampart_context_set_prv_key(rampart_context_t *rampart_context,                                       
./wsf_c/rampartc/include/rampart_context.h:    rampart_context_set_prv_key_type(rampart_context_t *rampart_context,                                  
./wsf_c/rampartc/include/rampart_context.h:    rampart_context_set_prv_key_password(rampart_context_t *rampart_context,

所以基本上我只找到了1个文件,wsf_policy.c,它使用rampart_context_set_prv_key,但包含看起来正确,我不知道如何解决它。有什么想法吗?

最佳答案

同样的问题。解决方法与 Error when trying to run security examples in wsf/php 2.1 中相同:

sudo apt-get install gcc-4.4

然后通过运行配置 wsf/php

./configure CC=gcc-4.4

按照其余的正常安装步骤操作,它应该可以工作。

您还可以检查 wsf.so 库,看看它是否有链接的 Rampart 库

ldd /usr/lib/php5/20090626/wsf.so

此外,以防万一您还没有找到它,这里是使用 PHP 5.4 编译 WSF 的步骤 https://wso2.org/jira/browse/WSFPHP-477

关于php - WSO2 WSF/PHP 安装问题(需要 C 开发人员帮助),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12928626/

相关文章:

php - 性能缓慢的 MySql

PHPUnit 类无法找到自身

PHP array_search 始终返回数组的第一个键

c - 使用 libcurl 链接程序时未解析的符号

php - 如何在 PHP 上将 urn 添加到 SoapClient?

javascript - Ajax POST 请求变成 GET 请求

编译器在编译时跳过语句?

c - 通过char数组中的token获取参数

c++ - 如何在 SOAP 消息中发送密码

php - SoapClient : how to pass multiple elements with same name?