Web Servers on Unix and Linux - Perl scripts run in command line, but not in browser

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > February 2006 > Perl scripts run in command line, but not in browser





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Perl scripts run in command line, but not in browser
sealman202

2006-02-12, 2:46 am

So Ive been migrating old apps to a new server. Its a linux server,
dedicated, running the newest apache and all that. Now my problem:

I have a script that uses the PERL module html::template
This basically allows for use to use templates. Now when I run the
script in the ssh command line, it runs perfectly, exactly the kind of
output it should have. Now, when I try and run it from a browser, i
get error 500. I assume that because it runs properly in the command
line, that its not a PERL issue, not to mention all of this code is
tested and working on another server. So I figure it has to be
something with the apache configuration. Can anyone give me some
pointers on where to look for my problem?

FYI - Ive isolated the code that is making it fail to the part that
specifically uses html template. If it take that out it will run on
the browser. However, the whole thing works from the command line.
I'm fairly confident that I have all the modules I need, but then
again, it wouldnt run on the command line either if that were a
problem.

Any help would be tremendously appreciated...I dont normally get
stumped like this but I cant seem to get past it.

dubing@gmail.com

2006-02-13, 6:01 pm

What does your error_log say? Usually it should be in /var/log/. Also
turning on '-w' in the script (e.g. "#! /usr/bin/perl -w") would be
helpful.

Bing

sealman202 wrote:
> So Ive been migrating old apps to a new server. Its a linux server,
> dedicated, running the newest apache and all that. Now my problem:
>
> I have a script that uses the PERL module html::template
> This basically allows for use to use templates. Now when I run the
> script in the ssh command line, it runs perfectly, exactly the kind of
> output it should have. Now, when I try and run it from a browser, i
> get error 500. I assume that because it runs properly in the command
> line, that its not a PERL issue, not to mention all of this code is
> tested and working on another server. So I figure it has to be
> something with the apache configuration. Can anyone give me some
> pointers on where to look for my problem?
>
> FYI - Ive isolated the code that is making it fail to the part that
> specifically uses html template. If it take that out it will run on
> the browser. However, the whole thing works from the command line.
> I'm fairly confident that I have all the modules I need, but then
> again, it wouldnt run on the command line either if that were a
> problem.
>
> Any help would be tremendously appreciated...I dont normally get
> stumped like this but I cant seem to get past it.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com