Fred
07-11-2001, 02:28 PM
Is it me or does Perl just not work right on NT servers?
![]() | View Full Version : Perl and NT Fred 07-11-2001, 02:28 PM Is it me or does Perl just not work right on NT servers? allan 07-11-2001, 02:45 PM It's just you :D. Seriously, what type of problems are you having? JTY 07-11-2001, 03:11 PM Well Allan, it's easy tell you're a geek.... Sometimes you feel like OSPF, sometimes you don't. Layer 3's got OSPF, Layer 2 don't Although, I don't think most people understand it.... bteeter 07-11-2001, 03:17 PM Originally posted by Fred Is it me or does Perl just not work right on NT servers? Perl should work just fine on NT servers. Make sure the version you are using is up to date. Perhaps you have an old, buggy version running? What kind of problems are you having? Take care, Brian JTY 07-11-2001, 06:32 PM It could also be caused by script not being compatible with NT. Adam_S 07-11-2001, 06:53 PM Sometimes some scripts are written to be platform specific. most the time they are written with linux/unix in mind. I've only seen one or two that are for NT only, but the cross platform problem can cause headaches. Using Perl on NT is absolutley fine. If the script is compatable across the board or for NT specifically, it will work a dream. As said above, check on the perl version. If your host is far behind, make sure they know about it. thereismore 07-11-2001, 07:20 PM Ummmm.... Where's Fred?? Perl works fine on NT. Funny thing about platform independent languages. They are platform independent. Adam_S 07-11-2001, 07:24 PM If only that was always the case :( Actually I take that back.. platform dependance comes more from the programming, not the technology. wmac 07-11-2001, 08:29 PM Hello I have installed last version of Active State Perl on my server but it does work just on main domain but it does not work on other virtual domains I create. I have tried all possible permissions but it does not work yet. What can be the problem !? Regards, Mac allan 07-11-2001, 08:31 PM Originally posted by JTY Although, I don't think most people understand it.... [/B] Umm...it's a send of the Almond Joy slogan: Sometimes you feel like a nut, sometimes you don't. Almond Joy's got nut, Mounds don't. oh wait...did you mean people would not understand the technological reference :D? Adam_S 07-11-2001, 08:33 PM Does it return an error, or return the source code? JTY 07-11-2001, 09:33 PM Originally posted by uuallan Umm...it's a send of the Almond Joy slogan: Sometimes you feel like a nut, sometimes you don't. Almond Joy's got nut, Mounds don't. oh wait...did you mean people would not understand the technological reference :D? I know what it means, and what it's meant to sound like. But, I don't think most people understand the tech reference. Lawrence 07-11-2001, 10:29 PM There's all sorts of nasties with getting Perl to work on Windows NT. Here's a few general things that may or may not help: Firstly, in configuration of IIS where you specify programs to handle certain script extensions, you need to enter c:\Perl\bin\perl.exe %s %s instead of just c:\Perl\bin\perl. I have no idea why, maybe someone can help there. All I know is that the first one works but the second one doesn't. Also, IIS likes to run scripts in all manner of places BUT the place where they actually are. For example, if you have a script in c:\Inetpub\wwwroot\cgi-bin, IIS likes to tell Perl that it's in c:\FooledYa or something like that. Anyway, all perl scripts on NT should have something like this at the start: chdir 'c:\Inetpub\wwwroot\cgi-bin'; This actually strictly sets the working directory for the script (the directory you specify should be the directory that the script is actually in, of course, not necessarily what I have above). Also, IIS requires another header, not just the Content-type header to be printed. Insert this line of code above the printing of the content-type header: print "HTTP/1.0 200 OK\n" if ($ENV{PerlXS} eq PerlIS); The content type header is normally printed as so: print "Content-type: text/html\n\n"; Although the CGI module may be used, in which case some other procedure is called (I'm not sure what it is, because I don't use the CGI module). And that's about it for a crash course on getting perl scripts to work on Windows NT. You might want to check all that stuff to make sure the script that you're trying is actually compatible with Windows NT. If not, you should be able to make the above adjustments to it. Also, the flock() function is a killer for Windows. Any calls to it should be removed. I've also had a few troubles with using cookies via the CGI module on Windows NT. thereismore 07-11-2001, 11:09 PM Lawrence, I knew I hated NT for a good reason. Thanks for reminding me... thereismore 07-11-2001, 11:20 PM Oh, and again, where's Fred, who started all of this?? Lawrence 07-11-2001, 11:55 PM Originally posted by thereismore Lawrence, I knew I hated NT for a good reason. Thanks for reminding me... Don't worry, I'll pay for any required counselling or psychological assessment. :D Fred 07-12-2001, 09:25 AM I think that the server Im on just has to many restrictions at work, therefore, 99% of my scripts just wont work on it, but now that we got a Unix account it all works ok. I think its the server security, it may be set too high. Adam_S 07-12-2001, 01:18 PM Or simply compatability.. I think it all boils down to the right script for the right platform, and, of course, server management. |