Avatar of Bruce Gust
Bruce Gust
Flag for United States of America asked on

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

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?
PHP

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bruce Gust

ASKER
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!
Bruce Gust

ASKER
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!
Dave Baldwin

Glad you got it figured out.  phpinfo() tells you what PHP thinks it's doing.
Your help has saved me hundreds of hours of internet surfing.
fblack61