Malcolmd Posted June 1, 2004 Posted June 1, 2004 Pardon the slight rant surrounding this question: Is there any way to get more useful error messages out of my perl scripts. It seems that if there's anything wrong at all, I get "Premature end of headers" in the log file. I've got the permissions set right (755)... There are various problems I've found with scripts by fumbling around, but I got no help from error messages. I didn't realize how much I'd miss the shell access I had with my previous host. When I had a shell, I could run the script on the command line to see what came out. Without that, I have only the error messages to go by. One useful thing would be, a way (presumably within cpanel) that I could run a script and redirect the output to a file I can download and read. Thanks for your help, Malcolm Quote
annie Posted June 1, 2004 Posted June 1, 2004 I've found that many of the jobs I used to do with shell, can be done with cron jobs. I've used those a whole lot more than I ever anticipated! If you're doing heavy duty testing of scripts you write yourself, maybe you should set up your own Linux box at home. If you've got an old computer somewhere (even an old P1 100 MHz box will do, and even older if it's got a decent size hard drive), you can set it up and use for testing. Quote
TCH-Bruce Posted June 1, 2004 Posted June 1, 2004 I'll assume you are using some sort of Windows machine. You could always get a copy of Perl to run on your computer for testing purposes. One site that comes to mind is www.activeware.com Quote
dmohs Posted June 5, 2004 Posted June 5, 2004 When you create a new Perl script in Cpanel, the "blank" script contains these lines: >#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); That second line will dramatically improve your life. It's like having shell access, except the output is nicely formatted HTML. From the day of discovery, I haven't left that line out of a single script I've created. -David Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.