RE: [PHP] Interactive PHP script from commandline

From: Date: Wed, 27 Dec 2000 20:52:36 +0000
Subject: RE: [PHP] Interactive PHP script from commandline
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32008@lists.php.net to get a copy of this message
This is about the only other tutorial I've seen on the subject, I personally have done very little shell programming thus far so am not an ideal member for such a discussion :-) PHP Shell Scripting : by Joe Stump http://miester.org/simple_boards/threads.php/topicID,7/category,3 Perhaps it will help! Regards, Philip On Wed, 27 Dec 2000 o.cook@etoncollege.org.uk wrote: > Thank you very much for the pointer. However, that tutorial covers how to > pass arguments to the PHP script, rather than how to deal with calling other > executables from within the PHP script? Do you happen to have seen anything > along those lines at all? > > Many thanks for your help so far. > > Ollie > > > -----Original Message----- > > From: Philip Olson [mailto:philip@theprojects.org] > > Sent: 27 December 2000 20:40 > > To: o.cook@etoncollege.org.uk > > Cc: php-general@lists.php.net > > Subject: Re: [PHP] Interactive PHP script from commandline > > > > > > Hello Ollie, > > > > This tutorial may help you : > > > > Using PHP As A Shell Scripting Language : > > by Darrell Brogdon > > > > http://phpbuilder.com/columns/darrell20000319.php3 > > > > It explains passing/returning arguments in shell with PHP. > > > > Regards, > > > > Philip > > > > > > On Wed, 27 Dec 2000 o.cook@etoncollege.org.uk wrote: > > > > > I've compiled PHP to a binary that I can run from the UNIX > > commandline. > > > > > > If I try to execute a command from a script, it doesn't > > seem interactive; it > > > still accepts the input and acts on it; but you can't see > > the prompts. > > > > > > For example if I try to run 'passwd' I get this: > > > > > > <enter password> > > > <enter password again> > > > <enter password again> > > > Changing password for test_user > > > Enter the new password (minimum of 5, maximum of 127 characters) > > > Please use a combination of upper and lower case letters > > and numbers. > > > New password:Bad password: too simple. > > > Warning: weak password (enter it again to use it anyway). > > > New password:Re-enter new password:Password changed. > > > > > > You see how it doesn't show the "weak password" prompts or > > anything similar > > > (obviously dependant on input) until after the command has > > been executed. > > > > > > Is it possible to somehow run the command interactively? I > > tried system(), > > > exec(), passthru() and the backticks on Slackware 7.0. > > > > > > Regards, > > > > > > Ollie > > > > > > --- > > > Do radioactive cats have 18 half-lives? > > > > > > http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x53D29567 > > > --- > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32008) next »