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

时间:2012-10-17 06:45:35

标签: php c soap wso2 wsh

我正在尝试安装WSO2 WSF / PHP扩展以将SOAP与WSSE一起使用。 我在编译源代码时遇到问题,我需要从他们的存储库中检出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,

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

2 个答案:

答案 0 :(得分:2)

同样的问题。解决方法与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库以查看它是否包含链接的垒库。
ldd /usr/lib/php5/20090626/wsf.so

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

答案 1 :(得分:0)

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