Solved

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

Posted on 2016-07-20
4
61 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 83

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 83

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP and google maps 13 45
Can't find PHP files on account that has WordPress 3 27
comma true 6 34
php mysql check email already in database. (second check) 7 30
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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 look for a specific file type in a local or remote server directory using PHP.

803 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