Error 500 while loading perl file.

sh4ka

Well-Known Member
May 12, 2005
444
0
166
Uruguay
cPanel Access Level
DataCenter Provider
Hello,

We have a perl script that is located under cgi-bin/yabb/

Everytime it's loaded is causing an error 500, suexec logs shows everything correct but error_log shows this:

Code:
[Wed Mar 25 00:58:18 2009] [error] [client 190.135.xxx.xxx] [B]Can't locate Upload/CGI.pm in @INC[/B] (@INC contains: /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl . ./Modules ./Modules/Upload ./Modules/Digest ./Modules ./Modules/Upload ./Modules/Digest) at ./Sources/Subs.pl line 605.
[Wed Mar 25 00:58:18 2009] [error] [client 190.135.xxx.xxx] [B]BEGIN failed--compilation aborted at ./Sources/Subs.pl line 605.[/B]
[Wed Mar 25 00:58:18 2009] [error] [client 190.135.xxx.xxx] [B]Compilation failed in require at YaBB.pl line 57.[/B]
[Wed Mar 25 00:58:18 2009] [error] [client 190.135.xxx.xxx] [B]Premature end of script headers: YaBB.pl[/B]
It seems CGI.pm module can't be found.. can this be installed on the server? searched for this module in WHM - Main >> Software >> Module Installers but I wasn't able to find any module named like this.

In the other hand.. a simple "hello world" in the same directory works perfect.. so.. perl is working.. but the forum .pl file doesn't, don't know why.. permissions are 755 and owner are user.user.

Can anybody guide me? I'm using RHEL 5 + latest cPanel Current release tree.

Thanks.
 
Last edited by a moderator:

sh4ka

Well-Known Member
May 12, 2005
444
0
166
Uruguay
cPanel Access Level
DataCenter Provider
However, after ran find command saw that cgi.pm is actually installed :s

[[email protected]:~]find / -name CGI.pm -print 2>/dev/null
/home/.cpan/build/AppConfig-1.66/blib/lib/AppConfig/CGI.pm
/home/.cpan/build/AppConfig-1.66/lib/AppConfig/CGI.pm
/home/.cpan/build/CGI.pm-3.33-KHNxXi/blib/lib/CGI.pm
/home/.cpan/build/CGI.pm-3.33-KHNxXi/CGI.pm
/home/.cpan/build/Template-Toolkit-2.19/blib/lib/Template/Plugin/CGI.pm
/home/.cpan/build/Template-Toolkit-2.19/lib/Template/Plugin/CGI.pm
/home/.cpan/build/Template-Toolkit-2.20-_zd_zF/lib/Template/Plugin/CGI.pm
/home/.cpan/build/Template-Toolkit-2.20-_zd_zF/blib/lib/Template/Plugin/CGI.pm
/home/.cpan/build/CGI.pm-3.42-MxCP6N/CGI.pm
/home/.cpan/build/CGI.pm-3.42-MxCP6N/blib/lib/CGI.pm
/home/installd/perl588installer/perl-5.8.8/lib/CGI.pm
/usr/lib/perl5/5.8.8/CGI.pm
/usr/lib/perl5/site_perl/5.8.8/AppConfig/CGI.pm
/usr/lib/perl5/site_perl/5.8.8/i686-linux/Template/Plugin/CGI.pm
/var/cpanel/perl/easy/Cpanel/Easy/PHP5/CGI.pm
/var/cpanel/perl/easy/Cpanel/Easy/PHP4/CGI.pm
[[email protected]:~]
May this be a script problem? or a server problem? what do you think?
 

cPanelStephen

Active Member
Staff member
Aug 7, 2007
25
0
51
It would appear your script is trying to use Upload::CGI, which isn't a module published on CPAN. Do you have a module CGI.pm in a directory named Upload, that is included in the @INC path for that script?

If you're trying to use the CPAN published CGI.pm module, you will need to drop the Upload:: from the use of that module inside the script