473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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?

Aug 12 '07 #1
3 1400
On Aug 13, 12:20 am, Michael N <nietz...@gmail.comwrote:
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/

Aug 13 '07 #2
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.
js*******@attglobal.net
==================
Aug 13 '07 #3
>
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.

Aug 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Laurent Bertin | last post by:
Hi i got a strange problem but it's true i don't make thing like anyone... First Config: + IIS5.0 SP2 (yes i know...) WebSite Security Root : Digest Authentication, NT Authenticated SubFolders...
5
by: Yves-Alain NICOLLET | last post by:
How is it that when I include a script within a document it works and when I try to get it from my webserver it does not seem to work at all? I have documents on my webserver that contain a...
4
by: Řyvind Isaksen | last post by:
Hello! I'm really confused now, I need to schedule a ASP script on my webserver (win2k3) once a day but nothing works. First I tried to use the AT commant like this: at 07:00...
1
by: evilme | last post by:
greetings and salutations, o smarter than i. i've been working on a solution to secure the delivery of pdfs to client browsers. we're introducing an public-website element, so i've decided to use...
2
by: Rein Petersen | last post by:
Hi All, I've recently been intrigued with this notion of "Service Streaming": http://ajaxpatterns.org/HTTP_Streaming in which you make use of the webserver and browsers ability to maintain...
5
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
14
by: DavidNorep | last post by:
I do not know PHP, consider to write a CGI with this technology and have the following question. Is it possible to invoke a PHP script and let it endlessly wait for requests from a website (a...
0
by: Martin Bless | last post by:
If I have the option I choose Python to get things done or gain real understanding. The high quality and stability over time of both the language and the libraries is just amazing. OTH I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.