开发者

PHP (XAMPP) install ssh2 module on CentOS 5 using phpize failed

开发者 https://www.devze.com 2022-12-19 16:00 出处:网络
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,

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

开发者_JAVA百科

....

/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!


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:

sudo pecl install ssh2-beta 


Uninstall XAMPP on your Linux server and just install PHP/MySQL/Apache with YUM

sudo yum install php mysql mysql-server httpd

Start Apache

sudo service httpd start

Go to /var/www/html and create the this file info.php

<?php

phpinfo();

?>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消