0

我正在尝试安装 WSO2 WSF/PHP 扩展以将 SOAP 与 WSSE 一起使用。我在编译源代码时遇到了问题,我需要从他们的存储库中检出主干(而不是标签 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,但包含看起来正确,我不知道如何解决它。有任何想法吗?

4

2 回答 2

2

同样的问题。尝试在 wsf/php 2.1 中运行安全示例时以与错误相同的方式解决:

sudo apt-get install gcc-4.4

然后通过运行配置 wsf/php

./configure CC=gcc-4.4

遵循其余的正常安装步骤,它应该可以工作。

您还可以通过执行检查 wsf.so 库以查看它是否具有链接的壁垒库

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

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

于 2013-02-07T21:51:50.097 回答
0

在我的安装中,符号“rampart_context_set_prv_key”是在库 ${wsf.home}/lib/librampart.so 中定义的,由于 RPATH 变量,它可以从 wsf.so 直接访问。

于 2012-10-22T18:45:30.883 回答