|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-19 14:51 UTC] pollita@php.net
[2006-04-20 06:06 UTC] lars dot van-casteren at aircom dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 09:00:01 2025 UTC |
Description: ------------ ssh2 functionality makes 5.1.2 crash I installed ssh2 this way: downloaded the package (because it expects /usr or /usr/local) in the main directory of ssh2.0.10 I ran this: phpize ./configure --with-ssh2=/opt/csw make make all install I added the extension=ssh2.so to my php.ini file restarted apache First I tried to check phpinfo.php and that showed me the new streams and the new ssh2 module loaded successfully. A small script, which was used to test generated a core dump when executed from the command line. Apache just throws a seg fault in it's log Reproduce code: --------------- -bash-3.00$ cat ssh.php <?php $connection = ssh2_connect('backbase', 22, array('hostkey'=>'ssh-rsa')); if (ssh2_auth_pubkey_file($connection, 'admin', '/export/home/admin/.ssh/id_rsa.pub', '/export/home/admin/.ssh/id_rsa', 'secret')) { echo "Public Key Authentication Successful\n"; } else { die('Public Key Authentication Failed'); } ?> Expected result: ---------------- I should have been able to log in or atleast get an error back. Using other scripts in executing ssh2_connect all result in a core dump. Actual result: -------------- #0 libssh2_packet_write (session=0x0, data=0xffbfe6c0 "\005", data_len=17) at packet.c:1152 #1 0xfdc7f50c in libssh2_session_startup (session=0x5182a0, socket=-4201003) at session.c:333 #2 0xfdca3c64 in php_ssh2_session_connect (host=0x5121d8 "backbase", port=5341856, methods=0x512250, callbacks=0x0) at /tmp/ssh2-0.10/ssh2.c:424 #3 0xfdca438c in zif_ssh2_connect (ht=3, return_value=0x512278, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /tmp/ssh2-0.10/ssh2.c:455 #4 0x0023cc7c in execute () #5 0x0023c98c in execute () #6 0x0020fc1c in zend_execute_scripts () #7 0x001a6618 in php_execute_script () #8 0x0027900c in main ()