The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CGI not working anymore!! (working ok from prompt)

Discussion in 'General Discussion' started by internetfab, May 26, 2003.

  1. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Having severe problems with CGI for about 2 days time now. It seems that all our cPanel servers have probles with CGI - even our newly installed cPanel server :(

    If the script is called from prompt everything seems fine, the script executes. But as soon as it is called as a httpd request it fails with the error message premature headers (in the log file). Internal server error. (error 500)

    Yes, the scripts are running with the right permissions (755 or 644 - tried em all.) Reconfigured apache - still getting the same error.

    Running WHM 6.4.2 and cpanel 6.4.2-R5 on redhat 8.0

    All / Any help or advice or just about anything appreciated!!

    cPanel.net Support Ticket Number:
     
  2. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Found it out!

    Seems that Perl has been upgraded from 5.6 to 5.8 and now after content type one needs to put 2 \n after eachother for cgi scripts to work.. sigh ;)

    print "Content-type: text/html\n\n";

    Well.. there should be a switch in perl for this right? :) So that one doesn't have to go and change in every script..

    cPanel.net Support Ticket Number:
     
  3. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    I take it, you were not aware that Perl has 'always' operated that way. ;)

    cPanel.net Support Ticket Number:
     
  4. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I am also having broken CGI problems, and, unfortuantely, I do not quite understand how this fix is implemented?

    Could someone be a little more specific please?

    cPanel.net Support Ticket Number:
     
  5. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    Nevermind, that did not fix it either.

    cPanel.net Support Ticket Number:
     
  6. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    What do the error logs say?

    cPanel.net Support Ticket Number:
     
  7. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    The logs are not saying anything worthwhile, but it seems I have things working.

    One of the things I did in trying to get things working was to compile the perl module into Apache. I do not think that had anything to do with it, but what is that for, anyway?

    cPanel.net Support Ticket Number:
     
  8. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    Aren't you supposed to use buildapache.sea??

    cPanel.net Support Ticket Number:
     
  9. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    You can use the following code to get more useful error messages:

    #!/usr/local/bin/perl
    print "Content-type: text/plain\n\n";
    select(STDOUT);
    $| = 1;
    open(STDERR, ">&STDOUT");
    print "Starting CGI script execution now...\n\n";

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page