Reply to expect problems

Your name:

Reply:


Posted by sunadmn on 10/24/88 11:34

Hey all I have installed the PECL expect module and for the life of me I
can get it to work. Below is a sample script I am running and the error
message I am recieving.

<?php
ini_set ("expect.loguser", "Off");

$stream = popen ("expect://ssh root@rlocalhost uptime", "r");

$cases = array (
array (0 => "password:", 1 => mypass)
);

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);
?>


PHP Fatal error: Call to undefined function expect_expectl() in
/var/www/localhost/htdocs/expect.php on line 10

I installed the PECL like this:

pear install package.xml

and this is my ini file

[expect]
; setup the logfile location
expect.logfile="/var/log/php_expect"
; Log user actions
expect.loguser="1"
; expect timeout
expect.timeout="10"

Can anyone tell me what I might be missing here.

Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация