Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2005
    Posts
    2

    Unanswered: fatal error: Error: could not get DBI handle

    This is the error I'm getting when I try to run scripts that require a DBI connection. I already ran the dbi test script from the command console and the drivers do list, including MySql. The scripts originally did work. I even uninstalled DBI and DBD and reinstalled them thinking that maybe the drivers were corrupt and still got the above error. My server is running on linux redhat 9. Any help with this would be greatly appreciated. I'm out of ideas on how to correct this problem.

    Thanks In Advance

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    Can you post some code snippets?
    board.perl-community.de - The German Perl-Community

  3. #3
    Join Date
    Jan 2005
    Posts
    2
    Quote Originally Posted by reneeb
    Can you post some code snippets?
    Here's the full error I'm getting.

    [quote]Content-type: text/plain
    CGI Error:
    Message: fatal error: Error: could not get DBI handle

    _________Form Variables __________
    admin:
    fullname:
    thedate: 20050203

    _________Environment Variables__________
    DOCUMENT_ROOT: /var/www/html
    GATEWAY_INTERFACE: CGI/1.1
    HTTP_ACCEPT: */*
    HTTP_ACCEPT_ENCODING: gzip, deflate
    HTTP_ACCEPT_LANGUAGE: en-us
    HTTP_CONNECTION: Keep-Alive
    HTTP_COOKIE: CFGLOBALS=HITCOUNT%3D2%23LASTVISIT%3D%7Bts+%272005 %2D01%2D18+08%3A19%3A09%27%7D%23TIMECREATED%3D%7Bt s+%272005%2D01%2D18+07%3A07%3A28%27%7D%23; CFID=1133778; CFTOKEN=62128859
    HTTP_HOST: anythinggoes.dns2go.com:8083
    HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322)
    PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
    QUERY_STRING: admin
    REMOTE_ADDR: 68.162.222.182
    REMOTE_HOST: static-68-162-222-182.bos.east.verizon.net
    REMOTE_PORT: 2251
    REQUEST_METHOD: GET
    REQUEST_URI: /cgi-bin/replicator/webscapesr.cgi?admin
    SCRIPT_FILENAME: /var/www/cgi-bin/replicator/webscapesr.cgi
    SCRIPT_NAME: /cgi-bin/replicator/webscapesr.cgi
    SERVER_ADDR: 192.168.0.106
    SERVER_ADMIN: bqueenan@adelphia.net
    SERVER_NAME: _default_
    SERVER_PORT: 8083
    SERVER_PROTOCOL: HTTP/1.1
    SERVER_SIGNATURE: Apache/2.0.40 Server at _default_ Port 8083

    SERVER_SOFTWARE: Apache/2.0.40 (Red Hat Linux)
    UNIQUE_ID: tZSH@38AAAEAABL-RxUAAAAZ
    Here's The Script

    #!/usr/bin/perl
    use CGI::Carp 'fatalsToBrowser';
    ################################################## ###################################
    ## webscapesr.cgi -- David Hasbrouck <support@webscape2000.com>
    ## Replicator 2000/Webscape Worldwide Replicator version 3.7.00 04/26/2000
    ## http://www.replicator2000.com / http://www.webscapeworldwide.com
    ## Copyright (c) 1995 - 2000 Hasbrouck Enterprises. All rights reserved.
    ## Hasbrouck Enterprises, 2104 Greenway Ave, Shakopee, MN 55379, USA.
    ## Be sure you understand LICENSE AGREEMENT (license.txt)
    ################################################## ###################################


    $graphic_path = "http://anythinggoes.dns2go.com:8083/";
    $href_path = "http://anythinggoes.dns2go.com:8083/cgi-bin/replicator/d.cgi/[PERSONALID]/";

    eval {
    require "html.cgi";
    require "downline.cgi";
    require "edituser.cgi";
    require "email.cgi";
    require "admin.cgi";
    require "passwords.cgi";
    require "createpage.cgi";
    require "form2email.cgi";
    #require "orderform.cgi";
    #require "settings.cfg";
    require "configure.cgi";
    require "db_func.cgi";
    };

    ### path to main configuration file
    if (!(-e "data/config/masterconfig.cfg"))
    { &first_time_run; }
    require "data/config/masterconfig.cfg";
    require "data/config/fields.cfg";

    $a1 = 1;

    $ofh = select(STDOUT);
    $| = 1;
    select($ofh);

    eval { &main; };
    if ($@) { &cgierr("fatal error: $@"); }
    exit;

    sub cgierr
    {
    print "Content-type: text/plain\n\n";

    $html_headers_printed = 1;
    print "<PRE>\nCGI Error: $!\n";
    print "Message: $_[0]\n\n";
    print "_________Form Variables __________\n";
    foreach $key (sort keys %FORM) {
    print "$key: \t$FORM{$key}\n";
    }

    print "\n_________Environment Variables__________\n";
    foreach $env (sort keys %ENV) {
    print "$env: \t$ENV{$env}\n";
    }
    print "\n</PRE>";
    exit;
    }


    1;
    Last edited by anythinggoes; 02-03-05 at 11:20.

  4. #4
    Join Date
    Feb 2005
    Posts
    1
    Did you figure this out?

    Did you buy the script from Adam or David?

    This script has to be installed in a very specific way or it won't work. David wrote it like that. It also has a file d.cgi that if used leaves your server wide open for hackers.

    Paula


    Quote Originally Posted by anythinggoes
    This is the error I'm getting when I try to run scripts that require a DBI connection. I already ran the dbi test script from the command console and the drivers do list, including MySql. The scripts originally did work. I even uninstalled DBI and DBD and reinstalled them thinking that maybe the drivers were corrupt and still got the above error. My server is running on linux redhat 9. Any help with this would be greatly appreciated. I'm out of ideas on how to correct this problem.

    Thanks In Advance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •