PHP (XAMPP) 使用 phpize 在 CentOS 5 上安装 ssh2 模块失败
我正在运行 CentOS 5 和 XAMPP PHP 5.3.1
我想配置 PHP 的 SSH 支持。
我首先安装了 libssh2,
然后从 http://pecl.php.net/ 下载 ssh2-0.11.0 package/ssh2
发出以下命令并在“make”后获得错误响应
#/opt/lampp/bin/phpize
#./configure –with-ssh2 –with-php-config=/opt/lampp/bin/php-config-5.3.1
#make
....
/root/tmp/ssh2-0.11.0/ssh2.c:在顶层:
/root/tmp/ssh2-0.11.0/ssh2.c:1336:错误:“ZEND_DEBUG”此处未声明(不在函数中)
/root/tmp/ssh2-0.11.0/ssh2.c:1353:错误:“zend_module_entry”之前应有“=”、“,”、“;”、“asm”或“属性” make: *** [ssh2.lo] 错误 1
有人可以吗?
谢谢!
I am running CentOS 5 with XAMPP PHP 5.3.1
I'd like to config SSH support for PHP.
I first installed the libssh2,
then download ssh2-0.11.0 from http://pecl.php.net/package/ssh2
issues the following commards and get the error response after 'make'
#/opt/lampp/bin/phpize
#./configure –with-ssh2 –with-php-config=/opt/lampp/bin/php-config-5.3.1
#make
....
/root/tmp/ssh2-0.11.0/ssh2.c: At top level:
/root/tmp/ssh2-0.11.0/ssh2.c:1336: error: 'ZEND_DEBUG' undeclared here (not in a function)
/root/tmp/ssh2-0.11.0/ssh2.c:1353: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zend_module_entry'
make: *** [ssh2.lo] Error 1
Can anyone here?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Linux 服务器上卸载 XAMPP,然后使用 YUM 安装 PHP/MySQL/Apache
启动 Apache
转到 /var/www/html 并创建此文件 info.php
在浏览器中转到 localhost,您应该会看到 PHP 信息页面。现在,某些命令可能有所不同,但快速 Google 搜索将为您提供正确的语法。
Uninstall XAMPP on your Linux server and just install PHP/MySQL/Apache with YUM
Start Apache
Go to /var/www/html and create the this file info.php
Go to localhost in your browser and you should see the PHP info page. Now some of the commands might differ but a quick Google search will give you the correct syntax.
首先,您永远不应该使用 XAMPP。其中存在已知的漏洞,但作者一年多来一直忽略它们。升级也很困难。 yum 中有一个完整的灯栈,您可以使用 yum 使整个系统保持最新。
pecl 和 pear 是包管理器,因此您不必下载源代码。您应该能够像这样安装它:
First of all you should never use XAMPP. There are known vulnerabilities in it and the authors have ignored them for more than a year. It is also difficult to upgrade. There is a complete lamp stack in yum, and you can use yum to keep the entire system up to date.
pecl and pear are package managers so you shouldn't have to download the source. You should be able to install it like this: