无法使用 php 安装 webpay 扩展?

发布于 2024-11-02 04:03:57 字数 241 浏览 6 评论 0原文

我正在尝试在本地安装 webpaySWIG 扩展,但它显示一些错误。

我所做的是

  1. cd webpaySWIG-3.2 (这是扩展的位置)
  2. sudo make -f makefilePhp5 (这个命令在他们的文档中提到)

在编译时我得到了跟随错误

致命错误:zend.h:没有此类文件或目录编译终止。

I am trying to install webpaySWIG extension in my local but it shows some errors.

what i have done is

  1. cd webpaySWIG-3.2 (this is the location for extesion)
  2. sudo make -f makefilePhp5 (this command is mentioned in their document)

while compiling I got the following error

fatal error: zend.h: No such file or directory compilation terminated.

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

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

发布评论

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

评论(4

扭转时空 2024-11-09 04:03:57

我知道这是一个老问题,但我最近遇到了类似的问题。

您需要更新 makefilePhp5 以包含正确的 php 包含目录。

通常它是:

PHP_INCLUDE_DIR = /usr/include/php/

但是,如果您在 Zend Server 上运行,则它是:

PHP_INCLUDE_DIR = /usr/local/zend/include/php/

如果它不在其中任何一个中,请搜索 zend.h 并使用该目录。

I know this is an old question but I had a similar problem recently.

You will need to update the makefilePhp5 to include the correct php include directory.

Usually it is:

PHP_INCLUDE_DIR = /usr/include/php/

However if you are running on Zend Server it's:

PHP_INCLUDE_DIR = /usr/local/zend/include/php/

If it's not in either of those do a search for zend.h and use that directory instead.

清风疏影 2024-11-09 04:03:57

另外,我对扩展程序正在寻找加载的链接库名称也有疑问。在这里您可以找到丢失的文件:

root@vps:~/webpaySWIG-3.3# ldd /usr/lib/php5/20100525/libwebpayclient.so
        linux-vdso.so.1 =>  (0x00007fff745fe000)
        libssl.so.6 => not found
        libcrypto.so.6 => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f396b28a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f396b008000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f396adf2000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f396aa66000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f396b7c6000)

然后找到每个丢失文件的当前版本名称,并为其创建一个符号链接,在我的例子中:

ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.6    
ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libssl.so.6

Also i had problems with the linked library names the extension was looking for to be loaded with. Here you can find out the missing files:

root@vps:~/webpaySWIG-3.3# ldd /usr/lib/php5/20100525/libwebpayclient.so
        linux-vdso.so.1 =>  (0x00007fff745fe000)
        libssl.so.6 => not found
        libcrypto.so.6 => not found
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f396b28a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f396b008000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f396adf2000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f396aa66000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f396b7c6000)

then find what ever your current versions name is for each missing and create a symlink to it, in my case:

ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so.6    
ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libssl.so.6
不气馁 2024-11-09 04:03:57

我也遇到过这个问题,但经过一番麻烦之后终于成功安装了。

为了节省其他开发人员的时间,我整理了一个库来围绕 Webpay 扩展。它包括一个安装了扩展的 Docker 容器,并有一个测试套件来检查与 St.George 测试服务器的连接性。

I struggled with this as well, but was able to get it successfully installed after a lot of hassle.

To save other developers time, I've put together a library to wrap around the Webpay extension. It includes a Docker container with the extension installed, and has a testsuite to check connectivity against St.George's test servers.

彩虹直至黑白 2024-11-09 04:03:57

除了这个问题之外,互联网上还有一个关于“webpaySWIG”的参考,那就是 这个 PDF 文档似乎是安装指南。您最好阅读它,尤其是有关所需软件包的部分。看来您缺少 PHP 开发包。

应该注意的是,该指南提到了使用 dl(),这是最近从 PHP 中删除的一个函数。您需要在 php.ini 中加载扩展。

There is exactly one reference on the internet for "webpaySWIG" other than this question, and that's in this PDF document that seems to be an installation guide. You would do well to read it, especially the bits about required packages. It looks like you're missing the PHP development packages.

It should be noted that the guide mentions using dl(), a function recently removed from PHP. You will need to load the extension in php.ini instead.

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