in reply to Conflict between CGI.pm & dbm Files?

My initial guess is that you have a permissions problem and your CGI code is running with your Web server's permissions and the file cannot be opened with those permissions. Check your Web server's error log for the message.

Another thing you can do is send your fatal error message directly to the browser.

#!/apps/PERL5/bin/perl -wT use CGI qw/ :standard /; use CGI::Carp qw/ fatalsToBrowser /; # remove for production use strict; print header, start_html, p( 'One' ); my $file = "/apps/servicelist/SLNamesDBMs/srv_name_new_to_represents"; dbmopen(%dbm_New_Eng, $file, 0644) or die "Cannot open ($file): $!"; print p( 'Two' ), end_html;

Miscellaneous comments:

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
Re: Re: Conflict between CGI.pm & dbm Files?
by heezy (Monk) on Sep 30, 2002 at 22:26 UTC

    There is nothing in the servers error logs?

    How can I go about sending the fatal error message directly to the browser?

    Cheers,

    Mark

      Add:

      #!/apps/PERL5/bin/perl use CGI qw(:standard); use CGI::Carp qw/ fatalsToBrowser /; # remove for production use strict; $|=1; # do not buffer output ...

      This will turn off buffering for your CGI script and print everything directly so that you can see what your script is outputing. The output should appear in your browser.

      --
      hiseldl
      What time is it? It's Camel Time!