expect problems

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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.

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

   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

; setup the logfile location
; Log user actions
; expect timeout

 Can anyone tell me what I might be missing here.


Site Timeline