Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unable to load dynamic library...not a valid Win32 application...

Posted on 2016-07-20
4
Medium Priority
?
94 Views
Last Modified: 2016-07-21
I'm trying to get PDFlib (pdflib.com) installed. I'm running into all kinds of trouble and I can't figure out why.

First off, I'm using WAMP and the icon that I double click on to get it running is "Wampserver32." I mention that because in light of the error message I'm getting, I'm thinking perhaps that's significant.

When I start WAMP, I get this error:

unable to load
The PDFlib site offers more than one option and I've tried every one that I've found.

I've gone with:

  • PDFlib-9.0.6-MSWin32-C-C++.zip
  • PDFlib-9.0.6p3-MSWin64-php

After install the dll into the ext directory and copying and pasting the dll name into the extensions portion of the php.ini, I've been met with defeat every time.

I should mention that the MSWin64 dynamic offers two different dll's; one is in the php-700-nozts_VS14 directory and the other is in the php-700_VS14 directory. The option (MSWin32) has "pdflib.dll" only.

In all three scenarios, I keep coming up with the same kind of error.

I don't think that it should be this hard - that I must be missing something.

Thoughts?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 41721940
'php-700' means it's for PHP 7 and you're running PHP 5.5 according to your error message above.  Find the version for PHP 5.5 and use that.  This info comes from the manual https://www.pdflib.com/fileadmin/pdflib/pdf/support/PDFlib-in-PHP-HowTo.pdf .
0
 

Author Comment

by:brucegust
ID: 41723135
Dave, I got it! There was another download package that I initially avoided because it was labeled as a Windows 84 bit OS. When I looked at the contents of that package, however, I found numerous PHP options whereas the other package only included two.

It took some doing and several re-starts to ensure I had the right Visual Studio version and non-threaded dynamic etc., but I got WAMP to start with no issues and the .dll file is listed in the extensions directory.

So, we're almost there!

I've got another question if you've got a moment. While I've been able to seemingly install the library correctly, there isn't a "check mark" alongside the way it's listed in my list of extensions when you click on the WAMP icon on my desktop. It's documented correctly on my php.ini file, but it doesn't show up as "active" on my list and I still get a fatal error when I try to run one of the test files. That question is at: https://www.experts-exchange.com/questions/28958743/Extension-is-installed-but-it-doesn't-appear-to-be-active-Why.html

Thanks!
0
 

Author Comment

by:brucegust
ID: 41723403
Never mind the other question! I figured it out. There's more than one php.ini file, despite the fact that I installed the dll in one directory and then adjusted the php.ini file in another.

ext directory - wamp/bin/php/ext
php.ini - wamp/bin/apache/apache2.4.9/bin

I was googling and found an article that said to look on your phpinfo() page to see where the loaded configuration file actually resides. Despite what I thought was a logical assumption, I was wrong. Once I adjusted the correct php.ini file, all was right with the world!
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41723609
Glad you got it figured out.  phpinfo() tells you what PHP thinks it's doing.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question