5

I've installed Strawberry Perl (v5.12.3) on Windows Server 2008 32 bit and I was hoping to run simpledb CLI tools.

I had a small issue with HOME environment variable, I renamed it to HOMEPATH to solve the problem, but when I tried to run I got:

This application has failed to start because libeay32_.dll was not
found. Re-installing the application may fix this problem.

Anyone knows how to solve the problem? Is it an issue of Strawberry Perl?

stivlo
  • 749
  • 3
  • 10
  • 24
  • I've run a search in my disk and found that libeay32_.dll is located in d:\perl\c -- so I think to solve the problem I've to find a way to let perl look in that directory for DLLs – stivlo Jun 09 '11 at 17:44
  • 2
    It's actually located in d:\perl\c\bin and that directory is listed in my PATH variable. – stivlo Jun 09 '11 at 17:51
  • 1
    As a temporary hack until someone suggest me a better solution, I've copied libeay32_.dll in the same directory of perl.exe - It is found only if I first cd to perl bin directory and run perl from there. Now it complains that it can't find libssl32_.dll, so I think I've to repeat this workaround for a few libraries. – stivlo Jun 09 '11 at 17:55
  • 1
    Next in line I found errors for libxml2-2_.dll, libiconv-2_.dll, and libz_.dll -- after copying them, it works. However I hope that someone suggests a better solution. – stivlo Jun 09 '11 at 18:05
  • `%path%` prepending plus re-running the webserver should work. Does it work? – Pacerier Feb 10 '16 at 09:30

4 Answers4

2

I had the same problem with Windows Server 2003, strawberry, and Bugzilla. My "solution" was to copy the missing .dll files to c:\windows\system32, whenever the system told me that it couldn't find a dll. The missing .dll files were all in the path. Previously I tried copying them to the directory where perl.exe is, and other places, but nothing worked. The only exception was the libmysql_.dll file, which worked when copied to the /strawberry/perl/vendor/lib/auto/DBD/mysql directory.

Hopefully someone will find the real problem and/or fix for this.

Mr Ed
  • 121
  • 3
  • Why not just modify the `%path%`? Prepend those values to the **start** of the path so that they'll be read before the other values. (You might need to restart the server after changing %path% for the changes to take effect.) – Pacerier Feb 10 '16 at 09:29
  • @Pacerier For some reason it does not work. I tried to edit global PATH variable, as well as use SETENV in Apache. While running httpd.exe and perl.exe do have the target folder in PATH, it is not used to lookup DLL. – Alex Feb 10 '23 at 13:20
2

I've corrected the problem by removing perl path statements in the windows environment variables. They were at the beginning of the string from an old install. The strawberry install added it's own path statements at the end. This allowed the new strawberry intall to search the paths in the correct order.

J. McCoy
  • 21
  • 2
1

I had the same issue trying to run Bugzilla, using Strawberry Perl portable through Apache and mod_cgi. The solution was to set the proper environment for perl as called through mod_cgi.

If you're using portable Strawberry Perl (or even if you're not it's worth trying this fix), add this to your httpd.conf (if using Apache - if not, see how your web server can set environment variables for cgi processes):

Define PERLPATH "C:\path\to\perl"
SetEnv PATH "${PERLPATH}\perl\site\bin;${PERLPATH}\perl\bin;${PERLPATH}\c\bin"
SetEnv TERM ""
SetEnv PERL_JSON_BACKEND ""
SetEnv PERL_YAML_BACKEND ""
SetEnv PERL5LIB ""
SetEnv PERL5OPT ""
SetEnv PERL_MM_OPT ""
SetEnv PERL_MB_OPT ""

I placed these in the <Directory> in which they are relevant, not globally, but your setup may be different.

I got these from portableshell.bat which is bundled with the portable distribution and is the only proper way to run it if you have another installation (or even none at all).

Although Bugzilla's code runs in taint mode (and thus should ignore the environment) it appears to not be the case entirely, probably because whatever was complaining about libeay32_.dll was called by the script, rather than being the actual main script itself.

mechalynx
  • 197
  • 1
  • 6
1

If you're using strawberry perl and you copied the install dir from another machine just execute update_env.pl.bat (found in the straberry dir) and reboot your PC.

Drnoone
  • 113
  • 4