tags:

views:

778

answers:

2

Hi,

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!

+1  A: 

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 
Rook
A: 

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.

Phill Pafford