Evyn has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am struggling to install the DBI module (see Installing DBI Module). PPM is not working for me, possibly because of restrictions on our LAN, so I have to install modules manually.

I have removed the TinyPerl perl58.dll that I installed. I uninstalled ActiveState Perl. I reinstalled it, and used perl -MExtUtils::Install -e install_default dbi.ppd to install it. It SEEMED to install.

When I run my CGI script I get two errors. The first is a message box, telling me that perl58.dll could not be found in the specified path. Unless ActiveState did not install it, it is there, and it is in my path. When I use Explorer to search for it, it is not found. I am using NT WS and I am not allowed admin rights (seriously).

The second error message, which appears in the browser, is:

Internal Server Error: Can't load 'C:/Program Files/ejd/perl/site/lib/ +auto/DBI/DBI.dll' for module DBI: load_file:The specified module coul +d not be found at C:/Program Files/ejd/perl/lib/DynaLoader.pm line 20 +0. at C:/Program Files/ejd/perl/lib/DBI.pm line 253 BEGIN failed--com +pilation aborted at C:/Program Files/ejd/perl/lib/DBI.pm line 253. Co +mpilation failed in require at C:\DevelopApps\TWRoot\cgi-bin\hello.pl + line 10. BEGIN failed--compilation aborted at C:\DevelopApps\TWRoot\ +cgi-bin\hello.pl line 10.

Edited by BazB: wrapped error message in code tags.

Replies are listed 'Best First'.
Re: perl58.dll, dbi, dbi.dll woes
by Roger (Parson) on Dec 24, 2003 at 08:13 UTC
    You should use the ActiveState's PPM utility to install precompiled modules. Open a command window, and type the following -
    ppm install DBI
    to install precompiled DBI module from ActiveState's own repository.

    If your system requires internet proxy, then you need to set the following environment variables:
    proxy: URL of your proxy proxy_user: user name proxy_pass: password
    I normally create a batch file that sets up the proxy environment for me...
    @echo off set proxy=http://proxy:3128 set proxy_user=roger set proxy_pass=password
    If your system uses proxy auto detection, then you can find out the location of your proxy by openning Internet Explorer and then type http://wpad/wpad.dat or http://wpad/proxy.dat to download the windows automatic proxy setup script and find out the actual proxy server URL and PORT.

      Thanks, but PPM is not working, even with a proxy set. I have tried more than 20 anonymous proxies, and I always get the same errors, ie can't find site or timeout.
      http://wpad/wpad.dat or http://wpad/proxy.dat both just come up with "page not found" errors.

      I have to install these modules manually. LAN admin will not give me any additional connectivity rights.

        Can you actually nslookup or ping the wpad server at all?

        You could find the proxy settings under connection settings of your internet explorer.

        If your network is using WPAD protocol to detect proxy settings, then there are only a few variations to the wpad config file, wpad.dat, wpad.txt, proxy.dat, proxy.txt, etc.

Re: perl58.dll, dbi, dbi.dll woes
by BrowserUk (Patriarch) on Dec 24, 2003 at 10:27 UTC

    The way Win32 locates .dll dependancies of .exe's, is to first look in the directory where the executable is run from, before looking in various other standard places and finally looking in the directories specified in the PATH environment variable.

    Your rather confusing description suggests that perl58.dll was located correctly when you did the install of dbi.ppd, otherwise the 'missing dll' error would have been reported at that point. Perl is probably installed correctly.

    So, for this problem to occur when you are running your CGI script, it must mean that you (or more likely, your web server) is invoking a different copy of perl.exe.

    If you copied perl.exe somewhere, and you did not also copy perl58.dll to the same location, then unless the bin directory of your standard installation is

    1. in your path -- eg. PATH= ....;C:\Program Files\ejd\perl\bin;...
    2. And the userid used by your webserver has the appropriate permissions to access that directory

    There is no way for the OS to locate the dll.

    You need to talk to a local LAN administrator in order to get your web server set up correctly. This isn't a perl problem.

    And while your talking with them about that, you should also ask them about the PPM problem and see if whatever local restrictions are preventing you using PPM can be lifted or worked around.

    Installing PPD's manually is a tricky business and requires a level of understanding that is is clear that you do not currently possess.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!

Re: perl58.dll, dbi, dbi.dll woes
by BUU (Prior) on Dec 24, 2003 at 21:09 UTC
    Better idea. Go to activestates repository, download the .ppm file to your hard drive, then invoke ppm and tell it to install the local file. The exact syntax escapes me, but this way the only connectivity you need to is download a file over the internet using whatever web browser is allowed.