Re: Win32::AdminMisc problems
Here are my guesses. 1. It's a file permissions problem. Any time I see a: open(OUT_EXT,">test.txt"); instead of: open(OUT_EXT,">test.txt") || die "can\'t open OUT_EXT"; it catches my eye. 2. It's a HTTP protocol problem. All cgi applications need to either redirect to another page or issue the HTTP response header: print STDOUT "Content-Type: TEXT/HTML\n\n"; [EMAIL PROTECTED] All opinions are my own and not necessarily those of my employer On Thu, 10 Oct 2002, Krishna, Hari wrote: > Hi Guys, > > I get the following error when I execute my perl script from the browser. > But when I execute the program by double clicking, it works fine. > Any guesses?? I see the result in the test.txt file "Password is correct" > > Heres' the code > > #! D:\Perl\bin\Perl.exe > use strict; > use Win32::AdminMisc; > > open(OUT_EXT,">test.txt"); > $domain = "abcdefg"; > $user = "confidential"; > $password = "confidential"; > if( Win32::AdminMisc::UserCheckPassword($domain, $user, $password)) > { > print OUT_EXT "Password is correct.\n"; > } > else > { > print OUT_EXT "Password is not correct.\n"; > } > > Here's the error > > --- > > CGI Error > The specified CGI application misbehaved by not returning a complete set of > HTTP headers. The headers it did return are: > > > Can't locate Win32/AdminMisc.pm in @INC (@INC contains: D:/Perl/lib > D:/Perl/site/lib .) at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. > BEGIN failed--compilation aborted at > D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. > > > - > > Tom Wyant --- Many thanks for your help. > > Thanks and Regards, > Hari > > CONFIDENTIALITY NOTICE: > This e-mail message, including all attachments, is for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. You may NOT use, disclose, copy or disseminate this > information. If you are not the intended recipient, please contact the > sender by reply e-mail immediately. Please destroy all copies of the > original message and all attachments. Your cooperation is greatly > appreciated. > Columbus Regional Hospital > 2400 East 17th Street > Columbus, Indiana 47201 > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::AdminMisc problems - is there an alternative?
At 12:59 09/10/2002 -0700, $Bill Luebkert wrote: >Maybe the constants aren't defined: > >use constant EWX_LOGOFF => 0; >use constant EWX_FORCE => 4; > >Other values: I eventually got this work to using the actual values rather than the constant names in the call to Win32::AdminMisc::ExitWindows. Thanks folks. Sean : --- Sean Ahern, Computing Support Officer, School of Television and Imaging, Duncan of Jordanstone College, 13 Perth Rd, Dundee, DD1 4HT. Tel : 0044(0)1382-345372 - ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::AdminMisc problems
- Original Message - From: "Krishna, Hari" <[EMAIL PROTECTED]> To: "'Sisyphus'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, October 11, 2002 11:58 PM Subject: RE: Win32::AdminMisc problems > AdminMisc.pm is located in D:/perl/site/lib/win32/. Then I have no idea why it can't be found. Just check the spelling of AdminMisc.pm as it is stored in the D partition. Perhaps windows has stuck on an extra '.txt' file extension ... not sure what effect that would have. The only time I've ever known perl to be unable to find a file that's "there", is when the file (or one of the directories in the file's path) has been spelled incorrectly). I suspect that the script (when you double click it) is being run by the perl that's in the C partition. (To check that, just double click a perl script that contains 'print "@INC"' and see if it gives the C or D directories.) You could change the file asociation so that the perl in D runs the script. It should then produce exactly the same error. Can you have the web server utilise the perl that's in C ? But hang on . just read further if perl is in 'D$' (not sure what that means) why is @INC set to 'D:/perl/site/lib ...'. Shouldn't that be 'D$:/perl site/lib...' ? Perl is not looking in the correct location - it's looking for a location that doesn't exist. How does that come about ? A simple fix would be to include this line in the script: use lib qw(D$:/perl/site/lib D$:/perl/lib); A better fix would be to have perl's @INC set correctly. Re-installing perl would achieve that. You could also do it by making manual config alterations - but I don't know the details regarding that method. Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Win32::AdminMisc problems
There are no permission problems on the directory. I have lots of other mail programs that are written in PERL and are executed via browser. They execute just fine. Also, I just tried what Ryan wanted me do. #! D:\Perl\bin\Perl.exe print "Content-type: text/html \n\n"; And it return a blank page.. Thanks, Hari. -Original Message- From: Gould, Kevin [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 04:26 PM To: Krishna, Hari; Thomas R Wyant_III; [EMAIL PROTECTED] Subject: RE: Win32::AdminMisc problems I'd check permissions on the directory. Likely you're not running the program as the same id interactively and through the webserver. Use www.sysinternals.com filemon to monitor inetsrv.exe to see if you're getting permission denied. -Original Message- From: Krishna, Hari [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:11 PM To: 'Thomas R Wyant_III'; [EMAIL PROTECTED] Subject: RE: Win32::AdminMisc problems Tom - I didnot understand "root around in the archieves"? Did you wanted me to search thru the archieves on the cpan and roth sites?? Its soo frustrating..I am too close to the solution and yet very far. -Original Message- From: Thomas R Wyant_III [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 03:28 PM To: [EMAIL PROTECTED] Subject: Re: Win32::AdminMisc problems Hari - You've got me. It seems to me if Win32::AdminMisc is installed on your server _and_ your browser has access to it, this shouldn't happen. But I've seen it come by on the mailing list. You might want to root around in the archives and see what comes up. Tom "Krishna, Hari" <[EMAIL PROTECTED]>@listserv.ActiveState.com on 10/10/2002 10:15:16 AM Sent by:[EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:Win32::AdminMisc problems Hi Guys, I get the following error when I execute my perl script from the browser. But when I execute the program by double clicking, it works fine. Any guesses?? I see the result in the test.txt file "Password is correct" Heres' the code #! D:\Perl\bin\Perl.exe use strict; use Win32::AdminMisc; open(OUT_EXT,">test.txt"); $domain = "abcdefg"; $user = "confidential"; $password = "confidential"; if( Win32::AdminMisc::UserCheckPassword($domain, $user, $password)) { print OUT_EXT "Password is correct.\n"; } else { print OUT_EXT "Password is not correct.\n"; } Here's the error --- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't locate Win32/AdminMisc.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. BEGIN failed--compilation aborted at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. - Tom Wyant --- Many thanks for your help. Thanks and Regards, Hari CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street Columbus, Indiana 47201 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portuges Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http:
RE: Win32::AdminMisc problems
I'd check permissions on the directory. Likely you're not running the program as the same id interactively and through the webserver. Use www.sysinternals.com filemon to monitor inetsrv.exe to see if you're getting permission denied. -Original Message- From: Krishna, Hari [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 4:11 PM To: 'Thomas R Wyant_III'; [EMAIL PROTECTED] Subject: RE: Win32::AdminMisc problems Tom - I didnot understand "root around in the archieves"? Did you wanted me to search thru the archieves on the cpan and roth sites?? Its soo frustrating..I am too close to the solution and yet very far. -Original Message- From: Thomas R Wyant_III [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 03:28 PM To: [EMAIL PROTECTED] Subject: Re: Win32::AdminMisc problems Hari - You've got me. It seems to me if Win32::AdminMisc is installed on your server _and_ your browser has access to it, this shouldn't happen. But I've seen it come by on the mailing list. You might want to root around in the archives and see what comes up. Tom "Krishna, Hari" <[EMAIL PROTECTED]>@listserv.ActiveState.com on 10/10/2002 10:15:16 AM Sent by:[EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:Win32::AdminMisc problems Hi Guys, I get the following error when I execute my perl script from the browser. But when I execute the program by double clicking, it works fine. Any guesses?? I see the result in the test.txt file "Password is correct" Heres' the code #! D:\Perl\bin\Perl.exe use strict; use Win32::AdminMisc; open(OUT_EXT,">test.txt"); $domain = "abcdefg"; $user = "confidential"; $password = "confidential"; if( Win32::AdminMisc::UserCheckPassword($domain, $user, $password)) { print OUT_EXT "Password is correct.\n"; } else { print OUT_EXT "Password is not correct.\n"; } Here's the error --- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't locate Win32/AdminMisc.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. BEGIN failed--compilation aborted at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. - Tom Wyant --- Many thanks for your help. Thanks and Regards, Hari CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street Columbus, Indiana 47201 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portuges Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street
RE: Win32::AdminMisc problems
Tom - I didnot understand "root around in the archieves"? Did you wanted me to search thru the archieves on the cpan and roth sites?? Its soo frustrating..I am too close to the solution and yet very far. -Original Message- From: Thomas R Wyant_III [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 03:28 PM To: [EMAIL PROTECTED] Subject: Re: Win32::AdminMisc problems Hari - You've got me. It seems to me if Win32::AdminMisc is installed on your server _and_ your browser has access to it, this shouldn't happen. But I've seen it come by on the mailing list. You might want to root around in the archives and see what comes up. Tom "Krishna, Hari" <[EMAIL PROTECTED]>@listserv.ActiveState.com on 10/10/2002 10:15:16 AM Sent by:[EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:Win32::AdminMisc problems Hi Guys, I get the following error when I execute my perl script from the browser. But when I execute the program by double clicking, it works fine. Any guesses?? I see the result in the test.txt file "Password is correct" Heres' the code #! D:\Perl\bin\Perl.exe use strict; use Win32::AdminMisc; open(OUT_EXT,">test.txt"); $domain = "abcdefg"; $user = "confidential"; $password = "confidential"; if( Win32::AdminMisc::UserCheckPassword($domain, $user, $password)) { print OUT_EXT "Password is correct.\n"; } else { print OUT_EXT "Password is not correct.\n"; } Here's the error --- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't locate Win32/AdminMisc.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. BEGIN failed--compilation aborted at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. - Tom Wyant --- Many thanks for your help. Thanks and Regards, Hari CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street Columbus, Indiana 47201 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portuges Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street Columbus, Indiana 47201 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::AdminMisc problems
Hari - You've got me. It seems to me if Win32::AdminMisc is installed on your server _and_ your browser has access to it, this shouldn't happen. But I've seen it come by on the mailing list. You might want to root around in the archives and see what comes up. Tom "Krishna, Hari" <[EMAIL PROTECTED]>@listserv.ActiveState.com on 10/10/2002 10:15:16 AM Sent by:[EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:Win32::AdminMisc problems Hi Guys, I get the following error when I execute my perl script from the browser. But when I execute the program by double clicking, it works fine. Any guesses?? I see the result in the test.txt file "Password is correct" Heres' the code #! D:\Perl\bin\Perl.exe use strict; use Win32::AdminMisc; open(OUT_EXT,">test.txt"); $domain = "abcdefg"; $user = "confidential"; $password = "confidential"; if( Win32::AdminMisc::UserCheckPassword($domain, $user, $password)) { print OUT_EXT "Password is correct.\n"; } else { print OUT_EXT "Password is not correct.\n"; } Here's the error --- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't locate Win32/AdminMisc.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. BEGIN failed--compilation aborted at D:\inetpub\wwwroot\Intranet\cgi-bin\xyz.pl line 2. - Tom Wyant --- Many thanks for your help. Thanks and Regards, Hari CONFIDENTIALITY NOTICE: This e-mail message, including all attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. You may NOT use, disclose, copy or disseminate this information. If you are not the intended recipient, please contact the sender by reply e-mail immediately. Please destroy all copies of the original message and all attachments. Your cooperation is greatly appreciated. Columbus Regional Hospital 2400 East 17th Street Columbus, Indiana 47201 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portuges Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::AdminMisc problems - is there an alternative?
- Original Message - From: "Sean Ahern" <[EMAIL PROTECTED]> > >Are you sure you haven't made a typo ? > > It was cut and paste straight from the documentation. Ive retyped it in > case there were was something bizarre and invisible in the source, but with > no change. > I just tried: use Win32::AdminMisc; use warnings; Win32::AdminMisc::ExitWindows(); and got the error: Usage: Win32::AdminMisc::ExitWindows($Flags) So it seems that the function exists for me. Do you get the same ? If so, try playing around with some other 'flags' values. If not, then maybe there's something wrong with your AdminMisc installation. Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs