You are invited to Log in or Register a free Frihost Account!

PERL problems

I have been using Frihost for quite some time now, and recently I started to learn PERL. Upon trying to use it on Frihost I ran across a slight issue. No one seems to know where the PERL interpreter is on Server 2. I went to the Frihost IRC channel and asked everyone there, no answers. I know PERL is installed on Server 2, Direct Admin tells me all sorts of PERL modules are installed.

I have been trying:

Those 3 all still return Error 500 when I try to load the PERL document. I am not quite sure that the path is the issue though, that is just my best guess. I have not been able to get at the Apache log files (DA returns an error saying the File isn’t found) either. I would very much appreciate it if someone were to help me regain access to my log files, and tell me where PERL is at.

#!/usr/bin/perl -Tw

use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);

print header();
print start_html(-title => "Test");

print "Hello world";


A few things:
1. The path to perl on server 2 is /usr/bin/perl
2. Use the header() functions to output a http header, or else you will get a 500 error
3. Use CGI::Carp qw(fatalsToBrowser); to have most (not all) of the errors in your script displayed in your browser instead of going to the apache error log (you cant view the apache error log in DA, which really sucks if you are debugging perl scripts).
4. Your script must have executable permissions (for example 755)
That is totally crazy(in a good way) I'm recently learning Perl, I already know decent PHP and I have HTML, CSS, and JavaScript pretty much mastered (not AJAX or Xml though Smile and it's great I can write programs for my webserver.. in Perl at that! PHP is great but you have to refresh the page in order to do stuff, Perl I'm hoping will be a little better.

A slight problem..

I use #!/home/wolvmag/perl

It prints the HTML but then I end up with a ton of print(""); on my screen. Liek the browser took the HTML and then printed the rest as text. (Which was supposed to be Perl functions and such) how do I get it to interpret the Perl, instead of just showing everything on the screen?
Thanks man, no one else seemed to know what was going on with PERL.
Related topics
Facing Many Problems
New forum area (computer problems)
deleting all the original files
[tutor] How to protect images without htaccess using PHP
Perl Tutorial links
Problems With Index Page
FTP problems --> Use Filezilla and/or active mode
how can i find the perl location?
writing COM components in Perl
LWP::Simple Perl Module - Admin(s) Please :)
[ HELP] Problems with PHP and Perl
Server 4 problems (17-20-01-2012)
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

© 2005-2011 Frihost, forums powered by phpBB.