|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-02 09:06 UTC] avax at n1ck dot name
Description: ------------ expect 0.2 beta #php expect_sample.php sh: expect://ssh: No such file or directory Segmentation fault Reproduce code: --------------- script from http://ru.php.net/expect <?php ini_set ("expect.loguser", "Off"); $stream = popen ("expect://ssh root@remotehost uptime", "r"); $cases = array ( array (0 => "password:", 1 => PASSWORD) ); switch (expect_expectl ($stream, $cases)) { case PASSWORD: fwrite ($stream, "password\n"); break; default: die ("Error was occurred while connecting to the remote host!\n"); } while ($line = fgets ($stream)) { print $line; } fclose ($stream); ?> Expected result: ---------------- work expect_expectl PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 08:00:01 2025 UTC |
back trace [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 21909)] sh: expect://ssh: No such file or directory Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 21909)] 0xb759796f in exp_printify () from /usr/lib/libexpect.so (gdb) bt #0 0xb759796f in exp_printify () from /usr/lib/libexpect.so #1 0xb7596c6e in exp_expectv () from /usr/lib/libexpect.so #2 0xb7f167d6 in zif_expect_expectl (ht=2, return_value=0x86ba944, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /tmp/tmpl82GSK/expect-0.2/expect.c:256 #3 0x08292532 in zend_get_zval_ptr_ptr () #4 0x08291788 in execute () #5 0x0826a075 in zend_execute_scripts () #6 0x0822a8dd in php_execute_script () #7 0x082e3728 in main () --- php -i | head phpinfo() PHP Version => 5.1.1-gentoo System => Linux xxx.ru 2.6-air2 #1 SMP Thu Aug 4 00:58:33 MSD 2005 i686 Build Date => Mar 1 2006 11:01:18 Configure Command => './configure' '--prefix=/usr/lib/php5' '--enable-pty' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--enable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype' '--with-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--enable-ftp' '--with-gettext' '--with-gmp' '--without-hwapi' '--without-informix' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--disable-memory-limit' '--with-mhash' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses' '--without-oci8' '--without-oci8-instant-client' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl' '--disable-pdo' '--without-pgsql' '--with-pspell' '--without-recode' '--disable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--without-xmlreader' '--without-xmlrpc' '--without-xsl' '--with-zlib' '--disable-debug' '--enable-dba' '--with-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc/php/cli-php5/php.ini Scan this dir for additional .ini files => /etc/php/cli-php5/ext-active