Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Unable to run batch file in CGI Script

by Bloodnok (Vicar)
on Sep 23, 2009 at 14:35 UTC ( [id://796986]=note: print w/replies, xml ) Need Help??


in reply to Unable to run batch file in CGI Script

Nothing you've written will cause your CGI script to die, hence, assuming your script generates nothing on STDOUT or STDERR, nothing will be output to the browser (via CGI::Carp::fatalsToBrowser). To get a textual representation of any errors, try something like...
my @out = `C:/BatchTest/test.bat`; die "@out ($?)" if $? != 0;

Check the Apache server logs - they may (or may not;-) provide some indication.

Is Apache configured to 'recognise' the directory containing the target script i.e. C:/BatchTest ?

If so, are the permissions on C:/BatchTest correct ?

A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://796986]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-24 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found