Jump to content

Search the Community

Showing results for tags 'expect'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi! I have created a script (more like a system) that uses expect. The idea is actually simple: you press a button, PHP opens an expect stream to a telnet, expect_expectl waits for specific output, PHP reads output, based on output PHP sends more data. (Im refering to this PHP module - http://php.net/manual/en/book.expect.php ) I have ran into multiple problems, one of them is that the expect extention seems to be really unstable, it crashes apache and can't really figure out why. Another problem is that sometimes it likes to simply skip an output for no reason and gets stuck in a while loop. Obviously this is happening randomly and I can't find the cause of it (its not the client's fault, the client processes command as it should). Even worse, I can't seem to compile the exepect module on any x64 machine, it seems that the code is not meant to be for 64-bit machine. I have tried a lot of things and basically I'm tired of this module (even gentoo seems to have removed it since PHP 5.3) and I don't think there is anything that can make the expect module work properly on current PHP versions. So my question is: can anyone give an alternative way to deal with these shell interactions? I'm looking at Python's "pexpect", I don't like that its bit tricky to read output from a Python script inside PHP and I don't like that I must use popen. Also found that TCL also has "exepect" which is very similar to Python's "pexepect" and also Perl has it too, haven't really dealt with either of those languages, but it is not anything "out of this world". The best way I can think of is using cgi-bin scripts, I send a request with parameters (IP, command etc.) to a Python/TCL/Perl script which then gives an output. And I can do this in 2 ways, either open a stream and fetch the output (like with popen, still don't like it) or with ajax (since the current page is based on ajax, not a big problem). Whats wrong with SSH? Its slow because of the encryption, telnet is able to proccess commands a lot faster (and on slower devices SSH creates a notable lag). Anyone has any advice?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.