Skip to main content

Domain unable to execute CGI scripts

Comments

5 comments

  • cPRex Jurassic Moderator

    Hey there!  Since you've already done extensive troubleshooting on this it might be best to create a ticket so this can be examined on the server directly.  Do you see anything in the main Apache log (/etc/apache2/logs/error_log) when the 500 error happens that may provide more clues?

    0
  • Dezdan

    Thanks for the reply, this is what I see: 

    [Mon Nov 10 06:29:11.164777 2025] [cgid:error] [pid 675625:tid 675776] [remote MY_IP] End of script output before headers: test.cgi
    [Mon Nov 10 06:29:12.272054 2025] [cgid:error] [pid 849745:tid 849745] (2)No such file or directory: AH01241: exec of '/home/USERDOMAIN/public_html/cgi-bin/test.cgi' failed

    To keep it simple, this is the test script - which works fine on other domains: 

    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    print "Hello, World!"; 
    0
  • cPRex Jurassic Moderator

    Thanks for that - could you check the PHP handler for that domain in WHM and see if that's different than other domains on the system?

    0
  • Dezdan

    This domain is inheriting 8.1 as are the other domains:  Inherit - PHP 8.1 ( ea-php81 )

    After some more digging and reading, I did find that if I add -w to the end of my shebang, everything works. So that makes this an encoding error? I still would like to figure out why this is only happening on this one domain. 

    0
  • cPRex Jurassic Moderator

    That part I'm not sure - it might be best to open a ticket.

    0

Please sign in to leave a comment.