Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
can i read my emails on lamp ftp 4 70
How to use 2 ON statements in inner join 3 45
Building a glossary into your website 9 60
Load string Array from file 23 42
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…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

751 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