Jump to content

regdude

Members
  • Posts

    60
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

regdude's Achievements

Member

Member (2/5)

0

Reputation

  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?
  2. Hi! I used this script: http://javascript-array.com/scripts/simple_drop_down_menu/ to make a menu in a PHPBB2 forum. From the IE view it is all fine, but from FF/Chrome it goes wrong! As here: http://img580.imageshack.us/img580/3213/menub.jpg So the first is that the menubar background for some reasons goes 2 times bigger and messes up the background, the second thing is that the hover background of a button doesn't seem to cover up all text. Here is the style: <style type="text/css"> #topmenu { z-index: 30 } #topmenu li { list-style: none; font-size: 11px; font-weight: bold; color: #EEEEEE; float:left } #topmenu li a { display: block; font-size: 11px; font-weight: bold; padding: 4px 8px 6px 8px; width: 60px; background-image: url(images/cellpic2.gif); background-repeat: repeat-x; color: #EEEEEE; text-decoration: none } #topmenu li a:hover { background: #FE9801 } #topmenu div { position: absolute; visibility: hidden; margin: 0; padding: 0; background-image: url(images/cellpic2.gif); background-repeat: repeat-x; border: 1px solid #4F4F4F } #topmenu div a { position: relative; display: block; margin: 0; padding: 5px 10px; width: auto; white-space: nowrap; text-align: left; text-decoration: none; background: #4F4F4F; color: #FFFFFF; font-size: 11px } #topmenu div a:hover { background: #FE9801; color: #FFFFFF } </style>
×
×
  • 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.