ctrlaltdel21

Member
Jan 6, 2021
23
1
3
Ontario, Canada
cPanel Access Level
Root Administrator
We are receiving a 500 internal server error on a website which references a json.cgi file. We understand that we need to configure our server to run the Perl script as a .cgi.

In cPanel, there are many Perl modules to install. Which one should we install or which one would you recommend installing?

This site is in a testing stage, so if a module doesn't work, we are able to do trial and error.

Thank you.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,859
600
273
cPanel Access Level
Root Administrator
Hey there! I need a bit more detail than that to be able to provide a recommendation. Could you paste the full 500 error, just making sure to remove any public information like domains or IP addresses? Once I see that I may be able to get you better details on what the issue may be.
 

ctrlaltdel21

Member
Jan 6, 2021
23
1
3
Ontario, Canada
cPanel Access Level
Root Administrator
Thanks for your reply. Here is what is displayed via the browser inspection tools:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) json.cgi:1

This error does not show when we access the site. It only shows when I inspect the page via my browser.
 

ctrlaltdel21

Member
Jan 6, 2021
23
1
3
Ontario, Canada
cPanel Access Level
Root Administrator
In the cPanel >> Errors page, here is the latest entry in the "Latest web server error log messages" box:

BEGIN failed--compilation aborted at json.cgi line 4.: /pathname/pathname/domain.com/swish/json.cgi, referer: http://domain.com/pagename.php?id=12345&table=task&name=classifiedname&page=searchUser

In the same box, it also showed this:

Can't locate JSON.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at json.cgi line 4 ......and then the path to our json.cgi.

I'm not sure where to find the main Apache error log.

Also, this website is a subdomain.

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,859
600
273
cPanel Access Level
Root Administrator
Thanks for the additional details. It seems like this might be an issue in your code, but this is something we'd have to test on our end while accessing the site. I do see your profile says you have root access to the server, so if that is true you can submit a ticket to our team so we can check that out. Just make sure to post that ticket number here so I can keep everyone updated with our findings.
 
  • Like
Reactions: ctrlaltdel21