Solved

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

Posted on 2016-07-20
4
43 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
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 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 82

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now