My script runs on win32, it won't run on Unix 
Author Message
 My script runs on win32, it won't run on Unix

Hi,
I have written a perl script based on a tutorial which I downloaded, in
this tutorial, the author suggested i use win32 (Activeperl) to debug my
perl scripts. The script runs without any glitches on a windows-based
system. When I try it on a unix server, it just returns an error message
- I do not have access to the log files, so i can't get any more
information than that.

Does anyone have any ideas as to why it won't run, or is there any Url
where i can see the dfferences(or how to modify a script for unix)?

Thanx

Warren

--== Sent via Deja.com http://www.*-*-*.com/
---Share what you know. Learn what you don't.---



Wed, 31 Oct 2001 03:00:00 GMT  
 My script runs on win32, it won't run on Unix

Quote:

>Hi,
>I have written a perl script based on a tutorial which I downloaded, in
>this tutorial, the author suggested i use win32 (Activeperl) to debug my
>perl scripts. The script runs without any glitches on a windows-based
>system. When I try it on a unix server, it just returns an error message
>- I do not have access to the log files, so i can't get any more
>information than that.

>Does anyone have any ideas as to why it won't run, or is there any Url
>where i can see the dfferences(or how to modify a script for unix)?

>Thanx

>Warren

My first guess would be that you either have not got the correct shebang on
the first line (#!/usr/bin/perl, or whatever the path to your Perl executable
is -- and you should probably have the -w and -T flags on for good measure),
or you don't have permission on the Unix box to run scripts (have you also
made sure your script is executable -- chmod 755 <yourscript> -- ?).

You might also try using
   use CGI::Carp qw/fatalsToBrowser/;
so that error messages get sent to the browser itself, to help with debugging
(although the above issues have to be resolved before the thing can even
compile).

 -- Robert

---------------------------------------------------
Robert Watkins

---------------------------------------------------
"These Perls of thought in Persian Gulfs were bred,
 Each softly lucent as a rounded moon;"
 -- James Russell Lowell
 In a Copy of Omar Khayyam



Thu, 01 Nov 2001 03:00:00 GMT  
 My script runs on win32, it won't run on Unix

Quote:
> Hi,
> I have written a perl script based on a tutorial which I downloaded, in
> this tutorial, the author suggested i use win32 (Activeperl) to debug my
> perl scripts. The script runs without any glitches on a windows-based
> system. When I try it on a unix server, it just returns an error message
> - I do not have access to the log files, so i can't get any more
> information than that.

> Does anyone have any ideas as to why it won't run, or is there any Url
> where i can see the dfferences(or how to modify a script for unix)?

If you have installed the ActiveState Perl you should have the documentaion
installed under the ActivePerl group in your start menu - you should look
at the perlport document to see traps that might catch you out.

A few things to look out for :

*  Incorrectly using binary mode to transfer program from Windows to Unix
   (You should ASCII mode )

*  Incorrect or missing shebang (#!) line - you will need to check with
   your hosting provider to determine what it should be,

*  Incorrect mode on your program - you will need to consult the
   documentation for your FTP client to find out how to correctly set it.

*  Missing modules.

*  Assumptions about paths or filenames.

You should also look at the perlfaq9 documentation wherein there is some
description of how you might get some better diagnostic from a CGI program.

/J\
--

Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>



Thu, 01 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Please Help:My script runs on win32, it won't run on Unix

2. Please Help: My script runs on win32, it won't run on Unix

3. IPC::Run won't run ...

4. script won't run...displays script text

5. perl 4 script that won't run under perl 5

6. why won't this short script run?

7. Perl CGI scripts won't run without -w switch (under Apache 1.3.x)

8. Perl scripts won't run on Linux

9. IIS4.0 won't run perl scripts which call external commands

10. system() won't run shell script correctly

11. perl script won't run correctly inside emacs

12. Server won't run Perl scripts (Fasttrack)

 

 
Powered by phpBB® Forum Software