Hi,
first of all, thanks for your quick answer.
Talking about the issue, the permissions are right because the cgi works until a "dbmopen,dbmclose,tie,untie" is reached.
I have many cgi scripts with html embedded, and when I request a cgi with any of the functions mentioned above, the result it's shown partially in the browser:
use CgiLib;
use ScmConf;
use ScmLib;
use LWP::Simple;
use AnyDBM_File;
&ScmConf::Init();
$starting_time = time;
&PrintHead(*STDOUT,"Document Index", "");
&ReadParse() ||
&PrintErrorMessage("Error in parameter list");
$key = $input{"key"};
$key =~ s/\s*$//;
($search_string = $key) =~ s/-/ /g;
$selected_category = $input{"category"};
@selected_status = split(",", $input{"status"});
if ($key =~ /^\w\w\w ?\d\d\d\d\d[ \w]*$/) {
print "<br><strong>Note</strong>: Search time can be greatly improve
+d if a document number is specified using dashes '-' between prefix,
+regnumber, variant and doctype<br><br>\n";
}
print "<table style=\"border: 1px solid #666666; margin-left: 20px; ma
+rgin-right: 20px;\" cellpadding=\"2\" cellspacing=\"4\">\n";
print " <tr>\n";
print " <th class=\"colheader\">Number<br><nobr>[Document Info]</no
+br></th>\n";
print " <th class=\"colheader\">Title<br>[Document]</th>\n";
print " <th class=\"colheader\">Author</th>\n";
print " <th class=\"colheader\">Status</th>\n";
print " <th class=\"colheader\">Last Updated</th>\n";
print " </tr>\n";
&flush();
my $count = 0;
my $count2 = 0;
my @result;
tie(%DOC, 'AnyDBM_File', &documentdb, O_RDONLY, 0664);
And at this point it fails and shows the following message in the "error_log" file:
child pid 29271 exit signal Segmentation fault (11), possible coredump in /export/home
But, in the other hand, when I request a cgi without any of this functions, it is shown correctly.
Also, I have trying to execute a simply perl outside of the server, in command line:
my $db = shift(@ARGV);
my $file = shift (@ARGV);
my (%DOC);
open (SAL, ">$file");
dbmopen (%DOC, $db, 0666);
foreach $keys (%DOC)
{@a = split ('\0', $DOC{$keys});
$q = join ('-',@a);
print SAL $keys ."=".$q."\n";}
dbmclose (%DOC);
close (SAL);
exit 0;
and it generates the error:
Segmentation fault (core dumped)
And for all of this, I'm a little bit confused about what could I do to solve this.
Thanks again for your help
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.