Skip to main content

cgi-bin path changed

Comments

8 comments

  • cPanelMichael
    Hello Eric, Could you verify if this system uses CloudLinux with CageFS enabled? Also, could you provide an example of a script used on the account to reproduce the issue? Thank you.
    0
  • sozotech
    Yes, it is Cloud Linux with CageFS on. Below is a sanitized version of the script. Also, since posting this message we have also opened a ticket 8027625 but I am not sure it has been worked on yet. #!/usr/bin/perlml use lib "/home/username/public_html/cgi-bin"; HAD TO ADD THIS TO MAKE IT WORK use CGI; $query = new CGI; $intPageID = $query->param('intPageID'); $strSecToken = $query->param('strSecToken'); ### Load the database module. use DBI; $db = DBI->connect("DBI:mysql:DBWebsite:localhost","DB_USER","DB_PASS"); ### Get the page title, content, and associated script (if any). $queryGetPageContent = $db->prepare("SELECT strPageTitle, strPageContent, strPageScript FROM pageDefs WHERE intPageID = ? LIMIT 1;"); $queryGetPageContent->execute($intPageID); $strError = $queryGetPageContent->errstr; @dataPage = $queryGetPageContent->fetchrow_array; $queryGetPageContent->finish; if ($strError) {$strReturn = "Failed|E01: Page could not be loaded. $strError";} else { if (!$dataPage[1]) {$dataPage[1] = " ";} ### If there's a script for this page, run it. if ($dataPage[2]) { require $dataPage[2]; } else {$strScriptResult = " ";} if ($strErrorCode) {$strReturn = "Failed|$strErrorCode|$dataPage[0]|$dataPage[1]|$strScriptResult";} else {$strReturn = "Success||$dataPage[0]|$dataPage[1]|$strScriptResult";} } ### Return some HTML. print "Content-type: text/html\n\n$strReturn"; ### Buh-bye. exit;
    Thanks, Eric
    0
  • cPanelMichael
    Yes, it is Cloud Linux with CageFS on.

    Try running the following command and let us know if the issue persists:
    cagefsctl --force-update
    Thank you.
    0
  • sozotech
    Ok, I ran that command and removed the path statement in the script and it is still not working so I had to put it back in. Eric
    0
  • sozotech
    Ok, mysteriously disabling CageFS and then re-enabling has fixed the site. We're gonna continue to monitor this. Not sure how that would fix it. Eric
    0
  • cPanelMichael
    Hello, This document may offer some insight on this topic: CloudLinux Documentation In particular, this entry: You have to run cagefsctl --update any time you have modified php.ini, or you want to get new/updated software inside CageFS.
    You can also reach out directly to CloudLinux support if you'd like them to take a closer look and determine how CageFS related to the specific issue: CloudLinux - Main | New template Thank you.
    0
  • sozotech
    This same account and server is also having problems with installing Perl modules from cpanel. When I try to get a list of modules I get the following error: "There was a problem fetching the list of available modules." The only error I see in /usr/local/cpanel/logs/error_log is the following when I open the perl modules page. Insecure dependency in chdir while running setgid at /usr/share/perl5/File/Find.pm line 834. Any clue on how to fix this. There error looks like a recurring problem but nothing else on the forum seems to have fixed it for me. Best regards, Eric
    0
  • cPanelMichael
    Hello, Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.