Closed Bug 987742 Opened 11 years ago Closed 9 years ago

Strawberry Perl requires C:\strawberry\c\bin\ to be in $ENV{PATH} to correctly load XS modules


(Bugzilla :: Installation & Upgrading, defect)

Not set



Bugzilla 5.0


(Reporter: louis.puttick, Assigned: LpSolit)





(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131205075310

Steps to reproduce:

using BZ 4.4.1, strawberry perl 5.16.3, MySQL5.6, apache 2.2 on windows server 2003 sp1. runs fine but on launching bugzilla web interface the following error is issued:
index.cgi: install_driver(mysql) failed: Can't load 'D:/Perl/perl/vendor/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at D:/Perl/perl/lib/ line 190.
index.cgi:  at (eval 108) line 3.
index.cgi: Compilation failed in require at (eval 108) line 3.
index.cgi: Perhaps a required shared library or dll isn't installed where expected
index.cgi:  at Bugzilla/ line 1265.

Actual results:

failed webpage

Expected results:

what should happen is that the cgi entry should find the path in perl to libmysql_.dll. The stop gap fix is to fix the problem with Strawberry Perl is to copy C:\strawberry\c\bin\libmysql_.dll to C:\strawberry\perl\vendor\lib\auto\DBD\mysql\libmysql_.dll.

many thanks to:
Assignee: nobody → installation
Component: General → Installation & Upgrading
Product: → Bugzilla
QA Contact: default-qa
Version: Production → 4.4.1
this is an issue with how perl is deployed on your system, which is outside of bugzilla's control.
you should report this issue to the strawberry perl maintainers.
Closed: 11 years ago
Resolution: --- → INVALID
thanks and noted.
This must be documented as this is a common issue with Strawberry Perl.
Assignee: installation → documentation
Component: Installation & Upgrading → Documentation
Ever confirmed: true
Resolution: INVALID → ---
The correct command is:

copy C:\strawberry\c\bin\libmysql__.dll C:\strawberry\perl\vendor\lib\auto\DBD\mysql\libmysql__.dll

(2 consecutive underscores, not just 1)
Assignee: documentation → LpSolit
Summary: libmysql_.dll is not found when using Strawberry Perl and MySQL → libmysql__.dll is not found when using Strawberry Perl and MySQL
OK, scratch that! The bug is on our side. We delete $ENV{PATH} in Bugzilla::init_page() but then Strawberry Perl doesn't know where required DLL are located to load XS modules. This bug is not just about libmysql_.dll but about all DLL required by XS modules, such as libexpat-1__.dll which is required by XML::Parser, etc...
Assignee: LpSolit → installation
Component: Documentation → Installation & Upgrading
Summary: libmysql__.dll is not found when using Strawberry Perl and MySQL → Strawberry Perl requires C:\strawberry\c\bin\ to be in $ENV{PATH} to correctly load XS modules
Attached patch patch, v1 (obsolete) — Splinter Review
This is an ugly hack to make Bugzilla work with Strawberry Perl. I know that $ENV{PATH} must be sanitized per perlsec and bug 59349 (wow, Bugzilla 2.14!), but I have no idea how to make it better.

Asking justdave for review as he was heavily involved when taint checks have been implemented in Bugzilla.
Attachment #8664456 - Flags: review?(justdave)
justdave, could you tell me if you are fine with is fix, else please redirect it to another reviewer.
Flags: needinfo?(justdave)
Attached patch patch, v2Splinter Review
Much better fix. Now I no longer guess the name of the directory in which Strawberry Perl is installed. perl.exe is in C:\...\perl\bin, and we need to also include C:\...\c\bin in the path. Tested on Windows 7.
Assignee: installation → LpSolit
Attachment #8664456 - Attachment is obsolete: true
Attachment #8664456 - Flags: review?(justdave)
Flags: needinfo?(justdave)
Attachment #8667811 - Flags: review?(gerv)
This is the last patch required to make Strawberry Perl fully work with Bugzilla.
Target Milestone: --- → Bugzilla 5.0
Comment on attachment 8667811 [details] [diff] [review]
patch, v2

Review of attachment 8667811 [details] [diff] [review]:


Attachment #8667811 - Flags: review?(gerv) → review+
Flags: approval5.0?
Flags: approval5.0? → approval5.0+
To ssh://
   7321534..8fff730  master -> master

To ssh://
   a326cd5..9cd7cb7  5.0 -> 5.0
Closed: 11 years ago9 years ago
Resolution: --- → FIXED
I have Installed Bugzilla 5.0.1 on Windows 2008 R2 ,Strawberry Perl (64-bit) and IIS 7.5.

Attachment issue has been fixed with this patch but one more issue has been arise after updating the patch.

Steps to produce error

1. Bugzilla Email Preferences Click disable all mail.
2. Save changes.
3. Create new bug (with or without attachment)
4. Submit bug

Error in post_bug.cgi

There was an error sending mail from 'bugzilla-daemon' to '': no sender

 at Bugzilla/ line 117.
	Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/ line 381
	Bugzilla::BugMail::sendMail(...) called at Bugzilla/ line 280
	Bugzilla::BugMail::Send(...) called at C:\bugzilla\post_bug.cgi line 209

I have disable all email communication so it should not try to send an email.

(In reply to Sadiq from comment #12)
> There was an error sending mail from 'bugzilla-daemon' to '': no
> sender

As the error message says, 'bugzilla-daemon' is not a valid sender. It must be a valid email address. That's the reason of the error.
I have disable all email communication so it should not try to send an email.

It was working fine before this patch
I can't see how this patch could cause Bugzilla to send email in circumstances it wasn't sending it before. I would take this to the support forum; but also, try backing the patch out and seeing if that actually does cure the problem or not.

I forgot to detaint $ENV{PATH} on Strawberry Perl, making graphviz unhappy.

To ssh://
   3a98ba4..a6562e0  master -> master

To ssh://
   6896e04..28ec15f  5.0 -> 5.0
You need to log in before you can comment on or make changes to this bug.