[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac to Unix & back?



Dennis Little wrote:
> The message we get if we try and execute from either the cgi-bin 
> directory  or the place we want it is:
> This server has encountered an internal error which prevents it from
> fulfilling your request.  The most likely cause is a misconfiguration.
> Please ask the administrator to look for messages in the servers
> error log.

Like others suggested, you must check your error log for details. Also,
have you implemented sufficient error checking code in your script
(open||die ã$!ã, eval||die ã$!ã, this||warn ã$!ã, etc.) ? As tideous it
may seem, a sophisticated error trapping concept is crucial for
cross-platform programming, not to mention the hours it can save you in
debugging errors of all kind.

The most common traps I encountered so far while developing CGI-Tools on
the Mac for Unix/NT systems:

1.	Invalid pathes (hardcoded pathes somewhere in script, bad shebang 
	line pointing to the Unix Perl (i.e., #!/usr/bin/perl instead 
	#!/usr/local/bin/perl)

2.	Wrong permission settings, creating new files/dirs for writing 
	without chmoding them beforehand

3. 	Invalid/misplaced Server HTTP headers, bad CGI Forms

4.	Inexistent Modules, Perl can't locate self-installed Modules 
	in Library path

5.	Platform-dependent system calls (opens a whole can of worms)

6.	Older Perl versions, unsupported functions

7.	Unix Perl can be more strict than MacPerl on suspicious code

8.	Requiring a lib that contains syntax errors

9.	Forgetting to run a syntax check for common errors

10. - 20.	Weird logic

	 

HTH,

Philippe Wiede
mailto:pwiede@virtuoso-net.com

........................................................................
Virtuoso. The Global Communications Agency. (R)
Austrasse 66, P.O. Box, CH-4002 Basle, Switzerland
Telephone +41-61-271 52 62, Telefax +41-61-272 11 74
mailto:email@virtuoso-net.com - http://www.virtuoso-net.com

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch