Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

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

    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:

    twitter: oderland_david

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    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:

    twitter: oderland_david

  3. #3
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    Originally posted by internetfab
    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:
    I take it, you were not aware that Perl has 'always' operated that way.

    cPanel.net Support Ticket Number:
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  4. #4
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    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. #5
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    Nevermind, that did not fix it either.

    cPanel.net Support Ticket Number:

  6. #6
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    What do the error logs say?

    cPanel.net Support Ticket Number:

  7. #7
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    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. #8
    Member
    Join Date
    Feb 2003
    Location
    Sachse, TX
    Posts
    567

    Default

    Aren't you supposed to use buildapache.sea??

    cPanel.net Support Ticket Number:

  9. #9
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    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:

Similar Threads & Tags
Similar threads

  1. Email was working, not anymore
    By andrescrucitti in forum New User Questions
    Replies: 3
    Last Post: 04-23-2010, 04:42 PM
  2. 500 error , no cgi scripts working anymore
    By oderland in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-27-2003, 06:05 AM
  3. Cron not working anymore?!
    By internetfab in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2003, 09:11 AM
  4. :blackhole: not working anymore
    By eter4 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-10-2003, 05:28 AM
  5. SSH Not working anymore...
    By icanectc in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-02-2003, 10:12 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube