Perl - Can't load Expat.xs.dll - perl

Dear all I try to get XML RPC running on Bugzilla. I installed all perl modules what has been described by mozilla. but when I like to access the perl cgi script http://localhost:8010/xmlrpc.cgi I get the following error.
Can't load 'C:/Strawberry/perl/vendor/lib/auto/XML/Parser/Expat/Expat.xs.dll' for module XML::Parser::Expat: load_file:the requested modul get not found at C:/Strawberry/perl/lib/DynaLoader.pm line 193.
I verified the mentioned dll file is existign at the place C:/Strawberry/perl/vendor/lib/auto/XML/Parser/Expat/Expat.xs.dll. Here I assume the dll may require other dependent dll and other perl modules. Apache log file does not show me any additional information.
Any hint what I can do?
I am using
Strawberry Perl v5.22.1 (64bit)
Bugzilla v4.4.11
Apache v2.4
Windows 10

I opened a bug on the mozilla page for bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1240367
The support answered me that strawberry is not supported for bugzilla v4.4 however I could solve the problem by copying the C:\Strawberry\c\bin\libexpat-1__.dll to C:\Strawberry\perl\vendor\lib\auto\XML\Parser\Expat\libexpat-1__.dll (same directory as Expat.xs.dll is located). After that the XML Parser stuff and Expat.xs.dll could be executed properly.
May be it helps for others. Regards

I think the right answer should be:
add the folders
C:\{PerlFolder}\c\bin\
C:\{PerlFolder}\perl\bin
to the path under environment variables.
where {PerlFolder} in your case is "Strawberry"

same pb, solved by adding perl\bin in path

Related

Problems while installing WWW::Mechanize::Firefox

I am using the windows 8 operating system and I am trying to install the WWW::Mechanize::Firefox module in ActiveState Perl, from CPAN. I have successfully downloaded and installed all the dependencies and also installed the MozRepl module on Firefox. I do not have noScript running on my firefox and hence I am assuming that Javascript is enabled across all files (I am not sure how or where to check that). Here is my error message when I try to install the module.
I also constantly receive this error throughout the installation - "Subroutine-MozRepl-Load Plugins redefined at line 104."
Any help is much appreciated ! Thank you !
EDIT - These are the errors -
As Kim suggested in comments, you will need Mozrepl and Firefox.
Please refer WWW::Mechanize::Firefox::Installation page for detailed instructions on how to install this module.
If you use ActiveStates package manager, you can find some pre-packaged but untested PPMs at https://github.com/Corion/www-mechanize-firefox/downloads .
I needed to use this module on Windows, and couldn't get it running with ActivePerl. So I installed http://strawberryperl.com/ and it worked. This version of perl seems to handle installs form the cpan command line utility better than Activestate, who expect you to use their perl package manager as the default module installer (and don't supply a dmake program). Strawberry Perl also comes with a C compiler so can build modules that are a mixture of Perl and C code.
And make sure mozrepl is running before you try to install.

Perl syntax checking in Eclipse, ignore missing modules

When I turn on syntax checking for Perl in Eclipse (with EPIC plugin), it shows errors in use directives, because I edit Perl remotely (through FTP with Remote Systems Explorer plugin) and some modules available on the remote FTP server are not available on my local machine.
Can Perl syntax checking be restricted not to show an error in the case of a missing module?
If no, I'd disable Perl syntax checking completely. By the way, how to do this?
From my googling, I don't think there is a way to do this. The best workaround seems to be creating dummy modules to make the errors go away. I've found 2 sources that recommended the use of dummy modules for this purpose; an answer on Stack Overflow and a forum post on Source Forge.
If you have ssh access to remote server than you can mount your lib directory from remote server to your local machine, for example if you're using linux you can do this with sshfs or if you're Windows user than use Samba.
Now go to project properties in Eclipse and in Perl Include Path section add your path to previously mounted directory.

Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML

I have downloaded strawberry PERL and writing one application with CGI Perl Apache on Winxp sp3).
One of the libraries (written by someone else) which I using uses XML::LibXML. When i load the page it gives Internal Server Error. From Apache error log i can see this error:
Can't load 'C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 190.
C:/strawberry/perl/site/lib/auto/XML/LibXML/LibXML.dll exists with all permissions.
Also this library works properly on Linux. My application also works fine if I remove all code that needs LibXML.
Can anyone tell me when can be possible issue here.
If you peek into the source for DynaLoader you'll find
Many dynamic extension loading problems will appear to come from
this section of code: XYZ failed at line 123 of DynaLoader.pm.
Often these errors are actually occurring in the initialisation
C code of the extension XS file. Perl reports the error as being
in this perl code simply because this was the last perl code
it executed.
You should have also gotten (but may not have noticed) the following dialog, which provides a more accurate error message:
The problem isn't that perl can't find LibXML.dll; it's that LibXML.dll can't find the real libxml. (The former is just a wrapper that provides Perl bindings for the latter.) To fix that you need to ensure that Strawberry Perl's c\bin folder is in your PATH. In your case, that would be C:\strawberry\c\bin.
You might have to check the environment variable settings in the windows,
make sure that the installation path of the module is present in the PATH variable.
The reason it works in linux is that make files usually set the environment variables for you in linux in windows it may not have set properly.
For eg;
go to Control Panel\System and Security\System click change settings then advanced tab in user variable section see if there is a variable called perl5lib.
if not create an new perl5lib variable and add the path of your library ( usuall C:\Perl\site\lib but may be different in your case)
I had the same issue after installing Strawberry perl. It was working fine when I run the script from server, but not remotely from a automation tool. The issue was because of the Environment variables not updated when we run it remotely. So I did server reboot, which resolved the issue.
I encountered the same problem recently, in my case it was not related to PATH variable (it was already correct). The thing is I was executing my script from Git Bash console and as it turned out git-bash perl was being used instead of Strawberry (see git-bash perl should not be first in path). Switching to standard Windows CMD terminal helped.

Using Actinic V8 and having a problem with Path to Perl and Perl Script Extension

I am using Actinic v8 and having a problem locating the path to Perl. I am getting this message popping up and I just don't know what to do to solve it.
The wizard needs to know where Perl is installed on the web server and what extension Perl scripts must have in order to execute on the remote server. You may need to contact your ISP to gather this information. Be sure to specify the "." on the extension if it is required. For example, ".cgi", or ".pl".
It then gives you an option for 'Path to Perl' and 'Perl Script Extension'
Your ISP knows where and if perl is installed on your server and if the server is configured to require file extensions for CGI scripts. There is no way anyone else can tell for certain.

How do I add Perl scripting support to a Delphi application?

PLDelphi is a Perl project hosted on CPAN. I am currently working on a Delphi application and I am investigating the possibility of adding Perl scripting support and read about PLDelphi.
Ideally, I'd like my application to not require Perl to be installed. PLDelphi claims to support this:
To use PLDelphi from your Delphi
application without need to install
Perl you will need this files in the
main diretory of your application:
PLDelphi.dll - The PLDelphi
library that loads the Perl
interpreter. PLDelphi.pm - Perl
side of PLDelphi. Perl56.dll -
The Perl library in case that you have
Perl built dynamic. PLDelphi_dll.pas -
PLDelphi classes and DLL wrapper.
lib/* - A Perl lib directory with basic .pm files (strict, warnings, etc...)
I am aware of RemObjects PascalScript and embedding Python in Delphi, but in this instance, I am interested primarily in Perl support.
Has anyone used PLDelphi with success? Or have you found other ways to execute Perl scripts from Delphi without the full Perl installation available locally?
EDIT:
To be more clear, I found 1 potential solution and that is using PLDelphi. However, I'd like to know if anyone has used it (last updated in 2004) before, and how well it worked.
I'm also interested in hearing about any other options for embedding a Perl interpreter with Delphi.
You could use Windows Script Host (which comes with VBScript and JScript by default) and install PerlScript from ActiveState.
Sadly PLDelphi isn't updated for XE3 or 64 bits there for won't work with Perl 5.16
I was really looking for a solution that didn't require installing anything on the client. It appears that PLDelphi is not working with ActivePerl 5.10...so I don't believe there is a ready solution to embedding Perl within a Delphi application.