« QL: Où s'en va votre argent? | Main | A Special Christmas Box from SNL »
septembre 20, 2006
Bad file descriptor on perl and IIS 6 (Win2003)
Here's a sticky problem that took me quite a while to find out.
I had a perl script that did a qx(something.bat $file); it worked fine on Win2000/IIS5, it worked fine on the command line on Win2003, but on the web site, I would always get a Bad file descriptor error.
So I replaced qx by system, and then I got the error: Can't spawn cmd.exe Then it was easy to figure out that the problem was related to cmd.exe.
The problem was that the IUSR_WEB user did not had the Read/Execute permissions on C:\windows\system32\cmd.exe. Also be sure to put $ENV{'PATH'} = 'C:/windows/system32/;'; on top of your script.
So in case anyone has this problem in the future, that's the way to solve it.
Posted by gfk at septembre 20, 2006 10:55 AM
Comments
Posted by: enjoy_life27
at mars 15, 2007 8:55 AM
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)