William,

I haven't tried this, but it is certainly an
interesting idea.  Not sure what the problem is
offhand, but you might want to try an even simpler test
script, maybe something like:

#!/usr/bin/perl
print "Content-Type: text/plain\n\nHello World\n";

You mentioned that you could run it from the command
line, can you also run the perl script directly from
the cgi-bin directory?

Also, do you have mod_perl installed?  If so (or if
installing it is an option), you may want to check out
Apache::PAR
(http://search.cpan.org/~nbyrd/Apache-PAR/), which is
designed for running PAR archives under Apache.

I am definitly interested in hearing how this turns out
for you.  I have an item on my TODO to get a version of
Apache::PAR for use with regular CGI, including as an
executable archive.

Regards,

Nathan


On Fri, 21 Nov 2003 06:43:42 -0800, William Hayden
wrote:

> 
> 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. 

Reply via email to