Using Perl system function to execute .exe file, getting error 32768
Posted on 2007-12-06
I have a Perl script that runs in Microsoft IIS server as a CGI script, and does the following:
1) Reads stuff from the database,
2) Creates a plain text file to describe some data on the local disk (same folder)
3) and uses the "system" sub-routine to execute an external program that creates an image of the database data, like this:
my $error_code=system("<path to executable> <parameters, including output image file name>");
However, the image does not show up on the resulting web page, and is never created on the disk -- the web page says Perl has an error of "32768". Also, what's interesting is that the plain text file DOES get created, but the image file doesn't, so it means Perl has no problems writing to disk, but cannot get the external executable to run and create the file...
Does anyone have idea idea what the error code 32768 means in Perl, and how to resolve this?