System call works at command line but not within CGI 
Author Message
 System call works at command line but not within CGI

This works at the command line but not within CGI - no errors or anything.
Any thoughts?




Wed, 18 Jun 1902 08:00:00 GMT  
 System call works at command line but not within CGI
I'm running into the identical problem:

/misc/somedir/test.pl works fine on the command line but it won't
execute when called via cgi. Any feedback would be appreciated.



Quote:
> This works at the command line but not within CGI - no errors or
anything.
> Any thoughts?




Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 System call works at command line but not within CGI


Quote:

> : This works at the command line but not within CGI - no errors or

anything.

Quote:
> There's probably an error but you're just not handling it correctly.


> I'd suggest one of a couple of things:
> 1.) Read the documentation for system() and how $? is used.  Then
>     use CGI::Carp or redirect STDERR to STDOUT.
> 2.) Use backticks instead of system.

3. Go read http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html
3a. Bookmark it.


Wed, 18 Jun 1902 08:00:00 GMT  
 System call works at command line but not within CGI

Quote:

>This works at the command line but not within CGI - no errors or anything.
>Any thoughts?




This is in the FAQ.

Just remember that CGI scripts usually run with different permissions, hence
it won't have permission to create/update the file.



Mon, 24 Mar 2003 06:26:51 GMT  
 System call works at command line but not within CGI
I have run the script interactively as webuser and it worked fine.  In fact,
now it's working fine via CGI.  I have no idea why it is working now because
I didn't make any changes.  Perhaps a coworker is messing with me.  It
wouldn't be the first time.

Anyway, I would like to thank everyone who helped me out but I could have
done without the wise ass remarks.

Best,
Mike



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. system call works in command line mode but not from web

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

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

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

5. Help, shell commands not working from within script

6. system call from within a cgi script

7. command line/system call anomaly

8. system commands do not work on NT

9. Why is the system call not working?

10. Help! System call does not work

11. System call in Perl not working

12. command line args not working correctly

 

 
Powered by phpBB® Forum Software