Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS'
CMD window popped up and stayed there until CGI timeout. The funny
thing was that it did run the Unix script and turned out the right
result. Just the CMD window ... I had to kill the window by clicking
on 'x'. After that it displayed CGI timeout error. What was going
on?
Thanks,
Tom
Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.
PHP script on Windows 2K:
<? php
/* Call a script on a remote unix box to display the name */
system <"rsh remoteunix -l thisuser \"/mybin/test.sh $firstName
$lastName\"">;
?>
Shell script on Unix box:
#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0 3 3878
On 1 Oct 2004 11:20:48 -0700, tm*******@yahoo .com (TL) wrote: Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS' CMD window popped up and stayed there until CGI timeout. The funny thing was that it did run the Unix script and turned out the right result. Just the CMD window ... I had to kill the window by clicking on 'x'. After that it displayed CGI timeout error. What was going on?
Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.
PHP script on Windows 2K:
<? php /* Call a script on a remote unix box to display the name */ system <"rsh remoteunix -l thisuser \"/mybin/test.sh $firstName $lastName\"" >; ?>
Could you post the real script?
Where did you get rsh from on Windows? Cygwin, Microsoft SFU, something like
that?
Shell script on Unix box:
#!/bin/sh firstName=$1 lastName=$2 echo Your name is: $firstName $lastName exit 0
--
Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
I missed two lines in php code. The complete php script should read
like:
<!-- test.php -->
<?php
$firstName = "Tom";
$lastName = "Lee";
system("rsh remoteunix -l thisuser \"/mybin/test.sh $firstName
$lastName\"");
?>
This is a very simplified test script. I made this one to see how rsh
is to be done under PHP. The rsh should be the one came with the W2K
installation. The same rsh calling string was tested by entered
directly into CMD window without problem.
Start -> Run -> cmd, then on the DOS command line:
rsh remoteunix -l thisuser "/mybin/test.sh $firstName $lastName"
Thanks,
Tom
Andy Hassall <an**@andyh.co. uk> wrote in message news:<md******* *************** **********@4ax. com>... On 1 Oct 2004 11:20:48 -0700, tm*******@yahoo .com (TL) wrote:
Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS' CMD window popped up and stayed there until CGI timeout. The funny thing was that it did run the Unix script and turned out the right result. Just the CMD window ... I had to kill the window by clicking on 'x'. After that it displayed CGI timeout error. What was going on?
Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.
PHP script on Windows 2K:
<? php /* Call a script on a remote unix box to display the name */ system <"rsh remoteunix -l thisuser \"/mybin/test.sh $firstName $lastName\"" >; ?>
Could you post the real script?
Where did you get rsh from on Windows? Cygwin, Microsoft SFU, something like that?
Shell script on Unix box:
#!/bin/sh firstName=$1 lastName=$2 echo Your name is: $firstName $lastName exit 0
OK, I played more with rsh and it 'almost' pointed to IIS or PHP:
This is my original test php script:
test.php
<?php
$rl = system ("rsh rmoteunix -l username \"ls\"", $rc);
echo $rc;
echo $rl;
?>
The result of running this test.php was $rc=1 and balnk in $rl, and
'ls' wasn't executed on the remoteunix.
So I put the rsh line into a test.bat:
c:\myweb\home\t est.bat:
rsh remoteunix -l username "ls"
and changed the test.php to:
<?php
$rl = system ("c:\\myweb\\ho me\\test.bat");
echo $rc;
echo $rl;
?>
Now in the browser it showed
C:\MyWeb\Home>r sh remotehost -l username "ls" remotehost: remuser too
long rsh: can't establish connection
and $rc is blank and $rl "C:\MyWeb\Home> rsh remoteunix -l username
"ls"
However, if I ran test.php from cmd window (c:\php>php
c:\myweb\home\t est.php), I could get 'ls' executed from both cases.
Where does this lead to? I'd assume IIS or PHP changed something such
as logon name. Does anyone have experienced this problem?
Thanks,
Tom tm*******@yahoo .com (TL) wrote in message news:<74******* *************** ****@posting.go ogle.com>... Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS' CMD window popped up and stayed there until CGI timeout. The funny thing was that it did run the Unix script and turned out the right result. Just the CMD window ... I had to kill the window by clicking on 'x'. After that it displayed CGI timeout error. What was going on?
Thanks, Tom
Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.
PHP script on Windows 2K:
<? php /* Call a script on a remote unix box to display the name */ system <"rsh remoteunix -l thisuser \"/mybin/test.sh $firstName $lastName\"">; ?>
Shell script on Unix box:
#!/bin/sh firstName=$1 lastName=$2 echo Your name is: $firstName $lastName exit 0 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tony |
last post by:
what package should I be downloading for solaris intel.
Is there a howto on how to install it for solaris intel?
|
by: David H |
last post by:
Background.
I'm running on WinXP w/ MS Services for Unix installed (to give
rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm
running RHEE with python2.3 version. The code below works fine for me
in linux, but in WinXP the popen*() command "hangs". More
specifically, I get an apparent python prompt (without the '>>> ', but
whatever I type has no effect, and hitting return does a CR but not
the additional LF, so I...
|
by: sc0ri0n |
last post by:
Hi,
I want to be able to tail -f log files on a different machine and display
the results in a web page. Below code from the cgi works:
$cmd = "rsh -l $acc $Host tail -f $LogFileName |";
$count=0;
open LOG, $cmd or die "Could not open file: $!";
while (<LOG>){
$_ =~ s/\&/&/g;
|
by: rh0dium |
last post by:
Hi all,
I don't understand the signal module. I guess I understand what it
does in principle but I can't figure out how to use it to timeout an
external rsh command after a 5 seconds. Does anyone know how to do
this.
Here is what I have so far - which is largely based on the example on
the man page..
def handler(signum, frame):
|
by: Ben Eisenstein |
last post by:
DB2 V8.1 uses rsh to comunicate commands to the engine even if you are
not partitioned. Our security department would like to get rid of rsh.
Has anyone successfully used ssh? We were thinking of using a symlink
to migrate over. Has anyone done this?
Ben Eisenstein
Consultant DBA
| |
by: Mike Q |
last post by:
Hello,
I was wondering if anyone could point me to information on how to create an RSH interface/client with C#.
I know RSH is not the safest way to go about things, but the machine, I am trying to interface only has an RSH interface to talk to.
I do not want to use any standalone RSH client out there because I need to parse the information given back and also I would like it to be independent of an external program.
Thank you,
|
by: kepioo |
last post by:
Hi all,
I am trying to install PIL with python 2.3 on solaris X86, but I get
this error message :
building '_imaging' extension
creating build/temp.solaris-2.10-i86pc-2.3 creating
build/temp.solaris-2.10-i86pc-2.3/libImaging
/sgnome/tools/x86-solaris/forte/SOS8/SUNWspro/bin/cc -i -xO4 -xspace
-xstrconst -xpentium -mr -DANSICPP -D__STDC_VERSION__=199409L -DNDEBUG
|
by: jordan.mccheyne |
last post by:
I am running an RSH command through a Visual Studio 2005 app written
in c++. I am using a ShellExecuteEx to run the command. If the user
has Windows 2000, the RSH command completes correctly but the black
DOS window that comes up as the RSH is executing never goes away. It
just hangs there like the command never completes. In Windows XP, I
do not have this problem, the RSH window goes away after the RSH
completes. Does anyone know why...
|
by: jordan.mccheyne |
last post by:
I am running an RSH command through a Visual Studio 2005 app written
in c++. I am using a ShellExecuteEx to run the command. If the user
has Windows 2000, the RSH command completes correctly but the black
DOS window that comes up as the RSH is executing never goes away. It
just hangs there like the command never completes. In Windows XP, I
do not have this problem, the RSH window goes away after the RSH
completes. Does anyone know why...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |