Re: Trying to run expect from web page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guess I didn't explain my problem clearly enough.  I'm unable to execute a an expect script via a web page.  The page executes but the line with expect acts as if it's commented out or as if httpd.conf is missing something that allows expect to run.
 I've tried (via page.php):
exec("thescript...
exec ("sudo... 
exec("exec.bash.that.runs.expect.
a href="" ClickHere  (with /usr/bin/expect <path>myscript.exp).

nothing.  However running the expect script from the command line works.

SOLVED**

in php:  $out = shell_exec ("<path>/script.exp");

in script.exp:
#!/usr/bin/expect -f 
set timeout 10
spawn telnet <ipaddress>
expect ...
send...

Found something on the web saying Apache/browser(?) doesn't like how expect starts out - need to strip script down and do the spawn bit.  Any who life is good.

chuck




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux