I'm having some trouble with an application that I ran pp on. I can run the
resulting application on the command line, but when I access it via a web
browser and Apache runs it, the script fails. The error message in the
Apache error log indicates the problem is a compilation error in the script.
The script follows:
#!/usr/bin/perl -w
use CGI; # load CGI routines
$q = new CGI; # create new CGI object
print $q->header, # create the HTTP header
$q->start_html('hello world'), # start the HTML
$q->h1('hello world'), # level 1 header
$q->end_html; # end the HTML
1;
As you can see, I went back to a simple "hello world" script for testing
purposes.
Here is the error message in the Apache error log:
criteria_view.cgi: execution of criteria_view.cgi failed - aborting with -1.
BEGIN failed--compilation aborted at -e line 660.
[Thu Nov 20 17:02:41 2003] [error] [client 10.131.1.146] Premature end of
script headers: /home/httpd/html/wdh/toolbox/criteria_view.cgi
Here is the command line I used for pp:
pp --verbose 5 -o /tmp/criteria_view.cgi -I . -I ${LIBS_PATH} -I
${LIBS_PATH}/ToolboxDB criteria_view.cgi
Once I use the above command, I copy /tmp/criteria_view.cgi to
/home/httpd/html/wdh/toolbox/criteria_view.cgi so Apache can find it.
In my tests with running it from the command line, I log in as user "nobody"
since that is the user Apache will run the script as. Again, the executable
produced by pp runs from the command line, but not when Apache runs the
script.
Any help would be appreciated.
William D. Hayden
Keynote Sytems, Inc.
(972) 578-7429
This email message, and any attachments to it, are for the sole use of the
intended recipients, and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution of
this email message or its attachments is prohibited. If you are not the
intended recipient, please contact the sender by reply email and destroy all
copies of the original message.