Request: howto use a CLI php script at webserver (webconsole)?

This is a discussion on Request: howto use a CLI php script at webserver (webconsole)? within the PHP Language forums, part of the PHP Programming Forums category; i have some scripts made for use as a CLI scripts from the console. but i like use this scipts ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-12-2007
Michael N
 
Posts: n/a
Default Request: howto use a CLI php script at webserver (webconsole)?

i have some scripts made for use as a CLI scripts from the console.

but i like use this scipts from a webbrower.

i dont like to patch the scripts too much.

the script uses the stream wrapper:

php://stdin
php://stdout
php://stderr


possible solutions:

1) a wrapper to wrap over the php://sdt* streams
2) change the php://sdt* streams to a new wrapper (like webphp://sdt )



is there already a working solution?
maybe with use of ajax?

Reply With Quote
  #2 (permalink)  
Old 08-13-2007
R. Rajesh Jeba Anbiah
 
Posts: n/a
Default Re: Request: howto use a CLI php script at webserver (webconsole)?

On Aug 13, 12:20 am, Michael N <nietz...@gmail.com> wrote:
> i have some scripts made for use as a CLI scripts from the console.
>
> but i like use this scipts from a webbrower.
>
> i dont like to patch the scripts too much.
>
> the script uses the stream wrapper:
>
> php://stdin
> php://stdout
> php://stderr
>
> possible solutions:
>
> 1) a wrapper to wrap over the php://sdt* streams
> 2) change the php://sdt* streams to a new wrapper (like webphp://sdt )
>
> is there already a working solution?
> maybe with use of ajax?


I think, you might be knowing... anyway, fopen('php://stdin', 'r');
on command line is getting input from command line and on webserver
environment, it's reading from POST.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Reply With Quote
  #3 (permalink)  
Old 08-13-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Request: howto use a CLI php script at webserver (webconsole)?

Michael N wrote:
> i have some scripts made for use as a CLI scripts from the console.
>
> but i like use this scipts from a webbrower.
>
> i dont like to patch the scripts too much.
>
> the script uses the stream wrapper:
>
> php://stdin
> php://stdout
> php://stderr
>
>
> possible solutions:
>
> 1) a wrapper to wrap over the php://sdt* streams
> 2) change the php://sdt* streams to a new wrapper (like webphp://sdt )
>
>
>
> is there already a working solution?
> maybe with use of ajax?
>


Actually, something like this I would put the common stuff in classes or
functions. Then include it in both the command line and web page files.

Much more portable, and cleaner.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #4 (permalink)  
Old 08-13-2007
Michael N
 
Posts: n/a
Default Re: Request: howto use a CLI php script at webserver (webconsole)?

>
> Actually, something like this I would put the common stuff in classes or
> functions. Then include it in both the command line and web page files.
>
> Much more portable, and cleaner.
>


thats right. but i like to make a webconsole for existing CLI
scripts.
thats why i dont like to change too much the existing scripts.

if i change the existing scripts too much it is a big trouble if the
scripts are updated.

my idea is to make a webconsole for the CakePHP bake script.
the bake script make the output to the user via php://stdout and wait
then for input via php://stdin.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0