Code

Discussion on PHPTerminal - Shell-like environment for PHP apps

Discussion on PHPTerminal - Shell-like environment for PHP apps

By
Cart 16 sales

onether supports this item

Supported

18 comments found.

Will you update your code?

Hi, very nice. Is this project still updated? When do you plan to release next update?

Yes and no. I have one update sitting at my hard drive for months but actually no time to release it. Usually i just send the update via email.

First… I love this thing to no end, so you understand the context of query. 5 stars no question.

I am seeing no reference to registering commands in the Documentation directory. My documentation also references Wordpress, the link in the documentation also takes me to the Ether Wordpress version.

Thank you for your rating!

To create new command edit phpterminal/phpterminal/phpterminal.php file. Add new function with 3 arguments ($path, $args, $flags). $path is a current directory path in your phpterminal session, $args is an array of additonal command arguments (order of arguments matters here), $flags is an array of so called flags (e.g. -a, -d, order of flags does not matter).

function my_new_command($path, $args, $flags)
{
    // ...your code here
    $result = 'success'; // result can be either string or an array
    return array('done' => true, 'result' => $result);    
}

After that you need to register previously created function as a command using function phpterm_register($name, $argcount, $funcname, $desc). $name is a name of command in phpterminal, $argcount is a minimal required number of arguments, $funcname is a name of function to be executed, $desc is a short help/description text for a command.

phpterm_register(‘mycommand’, 0, ‘my_new_command’, ‘mycommand help’);

For more refrence and examples check out files in the phpterminal/phpterminal/bin/ directory. If you need additional guidance just hit me up via email.

You…are …awesome…. This is what a development community is all about. You have a fan for life my friend. Thank you!

is it possible to register new commands (like open a new page)?

Yeap, check out the documentation inckuded in the .zip file

Can I execute any OS app commands like nmap?

If your PHP env allows shell_exec() / exec() functions you can basically run any command you want

Can I run composer commands ?

Is this still being updated? Would you still be willing to code that jailshell so that there’s a specified directory you get dropped into where you cannot read the phpterminal.php script?

This is great work, by the way.

edit 111.txt Print: [Error: is a directory: 111.txt] windows+php7+apache

Check the permissions for 111.txt file (and also send me via email or here), PHPTerminal might not be able to edit this file. Also make sure there is no directory named 111.txt

Good product, Congratulations, Good luck with sales!

Congratulations , Nice Work, GLWS :)

Thanks! Any suggestions?

Congratulations! GLWS :)

New update almost done. It will feature:

- command auto completion

- color command output (e.g. ls)

- execute php scripts (inline and from files)

- command history buffer (use up and down arrows to navigate)

- register your own commands

Hi,

Within a main account, I have several databases as in the example below:

bdsystem

bdsystem_001

bdsystem_003

bdsystem_004

...

With this script can I run an update on all banks?

Ps: I have a dedicated server of my own.

All banks have the same username but with different passwords.

Database: example_1001

User: example_1001

Remember that I have a dedicated server, so I have root access to all accounts.

Shoot me an email at hq@onether.com so i can send you special command.

Great Work, Congratulations GLWS :)

Can i sandbox this to ONE FOLDER?

is root the required dir for this?

Root directory for phpterminal is the directory in which it’s exists. You can go to all sub-directories from there, but you can’t go to parent directories. If you need to sandbox for just one directory i can make small mod just for you.

Or you can just create separate directory, upload the entire script there and it will behave like sandbox for terminal.

Congratulations! Nice Work, GLWS :)

Thanks!

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey