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.

perl [nph function]

Discussion in 'General Discussion' started by prixone, Sep 12, 2005.

  1. prixone

    prixone Well-Known Member

    Joined:
    Mar 4, 2004
    Messages:
    107
    Likes Received:
    3
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I am wondering if there is any reason for nph- dont work with cpanel ?

    or how can i make it work.

    working code.
    Code:
    #!/usr/bin/perl 
    print $ENV{'SERVER_PROTOCOL'}, " 200 OK \n"; 
    print $ENV{'SERVER_SOFTWARE'}, "\n"; 
    print "Content-type: text/html \n\n"; 
    print "Countdown \n"; 
    for ($countdown = 10; $countdown > 0; $countdown--) { 
    print $countdown, "\n"; 
    sleep (1); 
    } 
    print "Liftoff!\n"; 
    exit(0);
    nph use to show the perl while its working so it should show like Countdown 10, wait 1 sec, 9, wait 1 sec, 8, ... ...

    vide info:
    http://perl.apache.org/docs/1.0/guide/porting.html#NPH__Non_Parsed_Headers__scripts

    would it work fine if i just add into httpd.conf the line
    <Files */nph-*>
    PerlSendHeader On
    </Files>

    or cpanel would reconfig and erase it ?
     
    #1 prixone, Sep 12, 2005
    Last edited: Sep 12, 2005
Loading...

Share This Page