Gregory Machin wrote:
Hi I'm developing a web interface for server admin in php, but the bos has added a complication, he wants ssh / telnet colson for as well, is i
your boss has just (theoretically) doubled the ammount of work you have to do, a cmdline interface is not something you bolt on as an after thought! it's just as much an interface (with all the potential hard work it takes to get it working properly) as an application webpage.
posible to create a consol app in php ? My original idea was to have a couple of files that the web interface would you to stor the settings and generate the configs, but now i have to rethink my planning because of the consol interface. Would you have any sugestions on how to keep consistancy between the 2 interfaces configurations ie. if the config is changed at the
use a single config file (use a ini type file?) or maybe a DB. just make sure you have some kind of update locking (check out the flock() function for example) so that changes don't overwrite each other or bork the config file somehow.
consol it should be reflected on the web interfact..
I don't think the real-time (on the cmdline) versus browser-time intertaction is an issue. especially if you consider that you could write the cmdline interface in the same way as the PEAR command works. the pear command is an executable php script that excepts many, many commands (relevant to PEAR isntall/repository management) which is called from your shell, e.g.: ?> pear install apc a normally SSH connection to the box gives access - rather than a direct connection to a port that hosts the cmdline application (or course its quite possible to write a php cmdline app. that runs as a telnet-like deamon, but personally I'd keep it simple and write a php shell script for which you need to SSH into the relevant box to use the script/tool.
Thanks for you time -- Gregory Machin greg@xxxxxxxxxxxxxx gregory.machin@xxxxxxxxx www.linuxpro.co.za www.exponent.co.za Web Hosting Solutions Scalable Linux Solutions www.iberry.info (support and admin) +27 72 524 8096
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php