Problems with system command in perl 
Author Message
 Problems with system command in perl

Hi,

I am running a java program where it posts to a CGI script written in
perl. The cgi script in turn fires another java program thro the system
command. All this workjed fine a few days ago. And i suddenly find it
not working.

I stripped the program downm to one which just calls a system command to
run a java program which prints a number to a file. This was working
fine if run directly in a shell. But if run from a browser, whatever is
there in the system command, it is not getting executed at all (Because
teh java program saves a number in a file, i clearly know that it is not
working).

Please, please help me!

Thanks in advance,

--Gangadhar.

The stripped down program.

#!/opt/local/bin/perl

use Socket;
require "../UTIL/soc-cgilib.pl";
require "../UTIL/wraputil.pl";

$|=1;


.:/export/home0/deba/Java/JDK1.02/java/lib/classes.zip temp");


print "output";
print "   $rc";



Sat, 28 Oct 2000 03:00:00 GMT  
 Problems with system command in perl


Quote:
>I am running a java program where it posts to a CGI script written in
>perl. The cgi script in turn fires another java program thro the system
>command. All this workjed fine a few days ago. And i suddenly find it
>not working.


are you sure that your CGI script knows where java is?

see the CGI Meta FAQ for references to documents which will help you
debug your problem.

good luck :)

--

CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>



Sat, 28 Oct 2000 03:00:00 GMT  
 Problems with system command in perl

I've seen cd and copy fail in system() on Win NT. I've not seen
problems with cd and cp inside system() on Unix.



Quote:
>Hi,

>I am running a java program where it posts to a CGI script written in
>perl. The cgi script in turn fires another java program thro the system
>command. All this workjed fine a few days ago. And i suddenly find it
>not working.

>I stripped the program downm to one which just calls a system command to
>run a java program which prints a number to a file. This was working
>fine if run directly in a shell. But if run from a browser, whatever is
>there in the system command, it is not getting executed at all (Because
>teh java program saves a number in a file, i clearly know that it is not
>working).

>Please, please help me!

>Thanks in advance,

>--Gangadhar.

>The stripped down program.

>#!/opt/local/bin/perl

>use Socket;
>require "../UTIL/soc-cgilib.pl";
>require "../UTIL/wraputil.pl";

>$|=1;

>print &PrintHeader;

>.:/export/home0/deba/Java/JDK1.02/java/lib/classes.zip temp");



>print "output";
>print "   $rc";



Sat, 11 Nov 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems with system command in perl

2. Problem running system commands from Win32 perl under Windows 95

3. Newbe problems with Perl for NT: system commands

4. perl system command using mail problems

5. pipe problem in backticks/system command

6. problem with system command

7. problem calling 'system' command

8. problems with system() command

9. Q: Problems with <system> command

10. IIS3 : Problem with system command DIR in cgi-script

11. PERL5-WIN32,NT4.0,IIS2.0 problem executing external system commands

12. system() command problem

 

 
Powered by phpBB® Forum Software