Perl problems

B

bryan

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
 
H

Helgi Briem

On 5 Jan 2004 06:10:33 -0800, (e-mail address removed) (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
 
G

gnari

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
 
R

Richard Gration

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
 
B

bryan

Helgi Briem said:
On 5 Jan 2004 06:10:33 -0800, (e-mail address removed) (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


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


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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top