Perl problems

Discussion in 'Perl Misc' started by bryan, Jan 5, 2004.

  1. bryan

    bryan Guest

    Hello all,

    I am not a perl programer at all, but i have a script that was written
    for me and i need to get it to work. All this script is supposed to
    do is gets data from a form that i have created. places it in a value
    = value format. it then calls a batch file that runs. and when that
    batch file is done i can carry on. my problem is if i run this file
    on a sambar server it works perfectly. If i run it on apache it
    doesnot work. I cant find the problem. and this is what the log file
    says
    Premature end of script headers: passproe.pl



    If anybody can help I would really appreciate it

    Thanks

    Bryan
     
    bryan, Jan 5, 2004
    #1
    1. Advertising

  2. bryan

    Helgi Briem Guest

    On 5 Jan 2004 06:10:33 -0800, (bryan) wrote:

    You should read the Posting Guidelines poster here
    periodically:

    http://mail.augustmail.com/~tadmc/clpmisc.shtml

    For more information about netiquette in general, see the
    "Netiquette Guidelines" at:

    http://andrew2.andrew.cmu.edu/rfc/rfc1855.html

    >I am not a perl programer at all, but i have a script that was written
    >for me and i need to get it to work.


    Then become one or hire one. The job newsgroups are thataway.

    >All this script is supposed to
    >do is gets data from a form that i have created. places it in a value
    >= value format. it then calls a batch file that runs. and when that
    >batch file is done i can carry on. my problem is if i run this file
    >on a sambar server it works perfectly. If i run it on apache it
    >doesnot work. I cant find the problem. and this is what the log file
    >says
    >Premature end of script headers: passproe.pl


    Read the Fine Manual:

    perldoc -q 500

    or http://perldoc.com/perl5.8.0/pod/perlfaq9.html

    These manual pages may also come in handy

    perldoc -q CGI
    perldoc CGI

    The esteemed brian d foy has collected various
    useful links in:

    http://xrl.us/CGIMetaFAQ
     
    Helgi Briem, Jan 5, 2004
    #2
    1. Advertising

  3. bryan <> wrote:

    > Subject: Perl problems



    Please put the subject of your article in the Subject of your article.


    > If anybody can help I would really appreciate it



    There is an error on line 17.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 5, 2004
    #3
  4. bryan

    gnari Guest

    "bryan" <> wrote in message
    news:...

    > my problem is if i run this file
    > on a sambar server it works perfectly. If i run it on apache it
    > doesnot work. I cant find the problem. and this is what the log file
    > says
    > Premature end of script headers: passproe.pl


    this probably means that there occurs an error before the CGI headers
    are printed.

    it sounds from your description like the script has been moved to
    a different server. this suggests a load of possible reasons for the
    problem:
    missing modules
    failing current directory assumptions
    privilege problems

    your REAL problem is how are we supposed to figure out what your problem
    is with so little information. it is like saying
    "my car does not work. it used to work fine last week until i did some
    changes to the engine. can you help me?"

    what you can try to do is to see what happens when you
    run the script directly from command line. are there any errors?

    do other CGI scripts work?

    has the apache process access and execution privilege to the batch jobs?

    you do not mention OS


    gnari
     
    gnari, Jan 5, 2004
    #4
  5. In article <>, "bryan"
    <> wrote:


    > Hello all,
    > I am not a perl programer at all, but i have a script that was written
    > for me and i need to get it to work. All this script is supposed to do
    > is gets data from a form that i have created. places it in a value =
    > value format. it then calls a batch file that runs. and when that batch
    > file is done i can carry on. my problem is if i run this file on a
    > sambar server it works perfectly. If i run it on apache it doesnot work.
    > I cant find the problem. and this is what the log file says
    > Premature end of script headers: passproe.pl If anybody can help I
    > would really appreciate it Thanks
    > Bryan


    "The premature end of script headers ..." error is common to most (all?)
    script errors in apache. Does the preceding line look something like:

    .... [error] (2)No such file or directory: exec of ... failed

    ? If so then your problem is most likely line end characters. The CRLF
    pair used to terminate the line on winders is causing apache to try and
    exec a program called "/usr/bin/perl^M" (or wherever your perl is). You
    can solve this in more than one way (of course!):

    a) fix your ftp program
    b) stop using winders
    c) put a "-w" on the end of the shebang line (perl might or might not
    know how to interpret a -w^M option, but it will stop the error in
    Apache)

    Rich
     
    Richard Gration, Jan 5, 2004
    #5
  6. bryan

    bryan Guest

    Helgi Briem <> wrote in message news:<>...
    > On 5 Jan 2004 06:10:33 -0800, (bryan) wrote:
    >
    > You should read the Posting Guidelines poster here
    > periodically:
    >
    > http://mail.augustmail.com/~tadmc/clpmisc.shtml
    >
    > For more information about netiquette in general, see the
    > "Netiquette Guidelines" at:
    >
    > http://andrew2.andrew.cmu.edu/rfc/rfc1855.html
    >
    > >I am not a perl programer at all, but i have a script that was written
    > >for me and i need to get it to work.

    >
    > Then become one or hire one. The job newsgroups are thataway.
    >
    > >All this script is supposed to
    > >do is gets data from a form that i have created. places it in a value
    > >= value format. it then calls a batch file that runs. and when that
    > >batch file is done i can carry on. my problem is if i run this file
    > >on a sambar server it works perfectly. If i run it on apache it
    > >doesnot work. I cant find the problem. and this is what the log file
    > >says
    > >Premature end of script headers: passproe.pl

    >
    > Read the Fine Manual:
    >
    > perldoc -q 500
    >
    > or http://perldoc.com/perl5.8.0/pod/perlfaq9.html
    >
    > These manual pages may also come in handy
    >
    > perldoc -q CGI
    > perldoc CGI
    >
    > The esteemed brian d foy has collected various
    > useful links in:
    >
    > http://xrl.us/CGIMetaFAQ


    Thank you for your fine comments. One day when i have time to become a
    perl programmer I will. I would also like to say i know it must be
    very annoying to one such as yourself when a idiot like my self post's
    wat seems to be stupid question. but in my defence i did search for 4
    days for a solution to my miniscule problem. Eventually as a last
    resort, and ready for ridicule, I came to the best for the soulutions.
    If one day you need help with something that i am proficient in i will
    gladly help you with references to as many web pages as i can find.
    Lastly To all the others that did send me thier comments and tips I
    thank you as i evevtually found the problem. the perl script was fine.
    the batch file that it calls was the problem. Anybody know where I can
    find a dos programming group.

    your doormat

    Bryan
     
    bryan, Jan 8, 2004
    #6
  7. bryan

    gnari Guest

    gnari, Jan 8, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,839
  2. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    323
    PerlFAQ Server
    Jan 23, 2011
  3. PerlFAQ Server
    Replies:
    0
    Views:
    712
    PerlFAQ Server
    Feb 3, 2011
  4. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    316
    PerlFAQ Server
    Feb 27, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    726
    PerlFAQ Server
    Apr 4, 2011
Loading...

Share This Page