RE: [users@httpd] Perl cgi question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems obvious that there is no file /Users/sdavis/Documents/workspace/DogDB/lib/Dog/HTML/DogForm.pm 

But on the other hand it could be too obvious to be true.

Otherwise I thought it was necessary to set "Options ExecCGI"...

-ascs

-----Original Message-----
From: Sean Davis [mailto:sdavis2@xxxxxxxxxxxx] 
Sent: Thursday, January 05, 2006 5:20 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Perl cgi question

I have a simple perl cgi script.  It runs fine from the command line from
the cgi-bin directory, but not in the browser.  I'm sure it is something
simple, but any ideas why it works from the command line but not the
browser?  Here is the error_log output:

[Thu Jan 05 10:20:45 2006] [error] [client 127.0.0.1] Can't locate
Dog/HTML/DogForm.pm in @INC (@INC contains: /Users/sdavis/Docum
ents/workspace/DogDB/lib
/System/Library/Perl/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darw
in-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl
/Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/P
erl/5.8.6 /Network/Library/Perl
/System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.8.6 /Li
brary/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/5.8.1 .) at
/usr/local/apache2/cgi-bin/testcgi.pl line 7.
[Thu Jan 05 10:20:45 2006] [error] [client 127.0.0.1] BEGIN
failed--compilation aborted at /usr/local/apache2/cgi-bin/testcgi.pl l
ine 7.
[Thu Jan 05 10:20:45 2006] [error] [client 127.0.0.1] Premature end of
script headers: testcgi.pl

And the testcgi.pl script:

#!/usr/bin/perl
use strict;

use lib '/Users/sdavis/Documents/workspace/DogDB/lib';

use CGI;
use Dog::HTML::DogForm;

my $form = Dog::HTML::DogForm->new;

display_page($form);

sub display_page 
{ 
    my $form = shift;
    
    my $q = CGI->new();
    
    print $q->header();
    print $q->start_html();
    print $form->start_html;
    foreach my $field ($form->fields) {
        print $field->html . "\n";
    }
    print $form->end_html;
    print $q->end_html();
}

Finally, the Scriptalias directive and Directory:

ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"

<Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>



Thanks,
Sean



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux