Hi monks, I already posted this, but some suggested me to add as much code as possible. Here is my problem. I have the decisions.cgi script thast when run locally, prints out the expected output( prints the keys for the db file). but when run on the web server it doesnt show the keys in the FORM. so this basically creates a table and dropdown menu. this menu contains the 'keys'for the db file(the hash is %DECISIONS). The same script works on another server apache1.3x, db1.8x, perl5 without any problem. but on my server (apache2.x extranet, perl 5.8, db4. it doesnt work. here is the code and part of the output.I think I can shorten this a lot, but one of the monks advised me to put down the entire code.
print "<hr>"; print "<table border=1>"; #type is an array that has 4 elememts new1,new2,new3,new4. foreach ($cgx=0; $cgx <= $#type; $cgx++) { $typedb=$type[$cgx] . "db"; print "typedb $typedb\n"; tie %DECISIONS, 'DB_File', "$fdbl[2]clotdes$typedb"; #the fdbl is a flatfile that has different paths to different db files +. in this instance, it gives /var/www/cgibin/local/clotdes(new1/new2/ +new3/new4)db print "<td>\n"; print "$type[$cgx] info\n"; print "<FORM NAME=\"seeinfo\" action=\"../../../../cgi-bin/decisions.c +gi\" method=\"POST\">\n"; print "<select NAME=\"clone\">\n"; foreach $ckey (sort keys %DECISIONS) { print "<option>$ckey\n"; } print "</select>\n"; print "<input type=\"hidden\" name=\"seeclone\" value=\"$type[$cgx]\" +size=7><p>"; print "Filter<input type=\"radio\" name=\"simplify\" value=\"1\">"; print "<input type=\"submit\" value=\"View Info\">\n"; print "</form>\n"; $z++; if ($z == 4) { print "</td></tr><tr>\n"; }else{ print "</td>\n"; } untie %DECISIONS; }
OUTPUT
<hr><table border=1>typedb newdb <td> new info <FORM NAME="seeinfo" action="../../../../cgi-bin/decisions.cgi" method +="POST"> <select NAME="clone"> <option>b01 <option>b02 <option>b03 </select> <input type="hidden" name="seeinfo" value="pa" size=7><p>Filter<input +type="radio" name="simplify" value="1"><input type="submit" value="Vi +ew Info"> </form> </td>
the <option>b01 etc is the stuff that doesn't show up on webpage. and see in the first line of output, it parsed the flatfile containing paths and extracted the 'new' and concatenated it with db and printed it. but this is simply a flat{not db) file. There is no problem with the file permissions. Only stuff not replated to 'db' files is output on the webpage. the others like 'key' of the db hash doesnt showup. Is there any version conflict etcc.. if so, why would it run locally and open the db file . thanks in advance UPDATE :: Hi monks thanx for your suggestions. I tried everything that you all told me to do. and now it works. yeah the problem was the webserver was changerooted. anyway, to this extent it works. the entire script has around 1700 loc. the server is dyin when i run that script. I shall work on that. thank you all once again

In reply to cgi works locally, but not on web server by talk2kvj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.