system call works in command line mode but not from web 
Author Message
 system call works in command line mode but not from web

i have the following system call

    $tmp1 = $TmpDir . "in.lp";
    $tmp2 = $TmpDir . "lp.out";
    print "<br>\ndollar! is : " . $! ."\n";
    $tmp = system
("/net/speedo/local5/cvar_files/SRC/LP_SOLVE/lp_solve_2.3/lp_solve <
$tmp1 > $tmp2");
    print "<br>System call to lp_solve returned: " . $tmp .
"<br>\ndollar! is : " . $! ."<br>\n";

$tmp is 1 (system call failed)but $! does not change from  "Operation
would block" between before and after the system call

this works fine if i run my script
and supply parameters to it from the command line.

However it creates the $tmp2 (the output file)
but puts no data into it when i run it from the web.

yes lp_solve is world executable
and yes the user "web" has write access to the $TmpDir listed

any hints?

thanks

brad



Fri, 27 Jul 2001 03:00:00 GMT  
 system call works in command line mode but not from web

i have the following system call

    $tmp1 = $TmpDir . "in.lp";
    $tmp2 = $TmpDir . "lp.out";
    print "<br>\ndollar! is : " . $! ."\n";
    $tmp = system
("/net/speedo/local5/cvar_files/SRC/LP_SOLVE/lp_solve_2.3/lp_solve <
$tmp1 > $tmp2");
    print "<br>System call to lp_solve returned: " . $tmp .
"<br>\ndollar! is : " . $! ."<br>\n";

$tmp is 1 (system call failed)but $! does not change from  "Operation
would block" between before and after the system call

this works fine if i run my script
and supply parameters to it from the command line.

However it creates the $tmp2 (the output file)
but puts no data into it when i run it from the web.

yes lp_solve is world executable
and yes the user "web" has write access to the $TmpDir listed

any hints?

thanks

brad



Fri, 27 Jul 2001 03:00:00 GMT  
 system call works in command line mode but not from web

Quote:

>this works fine if i run my script
>and supply parameters to it from the command line.

>However it creates the $tmp2 (the output file)
>but puts no data into it when i run it from the web.

Perhaps your web server runs with a chroot() that disallows it from seeing that
file (/net/...)? $tmp2 would get created anyway, because shells are kinda dumb
and make the stdout file anyway before checking to see if they can indeed run
the executable.

can't see why else this shouldn't work.

--
Sameer Siruguri                         Graduate student, CS, Rice University



Sun, 29 Jul 2001 03:00:00 GMT  
 system call works in command line mode but not from web

the problem was that the lp_solve executable
would run under one version of our digital unix but not under the version that was running on
the web server - missing some library or another

thanks

brad



Sat, 04 Aug 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. System call works at command line but not within CGI

2. -F works on command line but not on #!perl -paF line

3. call linux system command from web using perl

4. command line/system call anomaly

5. system() command not wrking in cgi / works fine in .pl

6. system commands do not work on NT

7. Why is the system call not working?

8. Help! System call does not work

9. System call in Perl not working

10. command line args not working correctly

11. Blat works from command line but not in CGI script

12. work on command line and not via browser?

 

 
Powered by phpBB® Forum Software