Home: Perl Programming Help: Beginner:
Why would a script....



jc1980
Deleted

Mar 1, 2001, 10:27 PM


Views: 752
Why would a script....

Why would a script work perfectly fine hosted on one server when I call it, it loads fine.

But on another server, I call the same script after going through all the necessary setup stuff and my browser attempts to download the script instead of running it in the window.

The script I'm using is ReadCSVPlus which reads a flat-filed database and outputs it using templates. The script runs as it should on the first server i tried it on, but now this new server I'm using is giving me download boxes everytime i try to visit the script.

Both server are Unix, if that matters....
Thanks for your time & cooperation!



Pascal
Deleted

Mar 2, 2001, 7:53 AM


Views: 746
Re: Why would a script....

Just an idea here, your shebang line ( first line of the script probably looks like : #!/etc/bin/perl ... the question is "have you got the perl Interpreter in that directory on the failing server ????

2 cents

PO



jc1980
Deleted

Mar 2, 2001, 8:23 AM


Views: 745
Re: Why would a script....

Actually, I have two scripts installed in the same directory on this new server. One script runs exactly as it should while the other does as I mentioned above - tries to be downloaded.

The first line on BOTH scripts is:
#!/usr/bin/perl

I'm not exactly sure what a Perl Interpreter is, but I think - whatever it really is - would not be the cause since one script works and one doesn't and they're in the same directory.

Maybe it could be something else?? Plz... I hope :)



muinatit
Deleted

Mar 2, 2001, 2:14 PM


Views: 742
Re: Why would a script....

Perl Interperater (spell check?) is the program that actually runs your program. Basically he's asking if you know that the path to perl is the same on both.

Jeffrey "muinatit" Lamoureux
muinatit@hotpop.com


jc1980
Deleted

Mar 2, 2001, 8:59 PM


Views: 739
Re: Why would a script....

Oh yeah, that makes sense, thnx....

Well, i discovered on my own that it was simply the server's inability to display .pl files so I just merely renamed it to .cgi file & it works fine.

Thnx anyway =)