Solved

Installing a PHP extension in a Vagrant environment

Posted on 2016-07-22
6
43 Views
Last Modified: 2016-07-24
I've been able to install the php_pdflib.dll successfully in my bin directory in a WAMP environment. So I know the correct PHP version as well as the VS version.

On the same machine, I've got a Vagrant environment and I need to install the same PDFlib. How? I've done a search for the bin directory or anything that resembles what I'm expecting to see and I'm not finding anything.

Thoughts?
0
Comment
Question by:brucegust
  • 3
  • 3
6 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 41725311
Look at 'php.ini' in your 'Vagrant' environment and see what it tells you.  It should look like this...

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "C:\PHP\ext"

Open in new window

0
 

Author Comment

by:brucegust
ID: 41725358
That's just it, Dave, and forgive me for being a pig on roller skates, here, but where would I look for the php.ini file within Vagrant? I've done a Ransack search and I can't find squat.
0
 

Author Comment

by:brucegust
ID: 41725406
php_ini file search
Here's what I came up with, but what corresponds to Vagrant?
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41725407
what corresponds to Vagrant?
I have no idea.  I do know that you have a big mess on that computer.
0
 

Author Comment

by:brucegust
ID: 41726764
I'm getting closer, Dave! I've been doing some research and I'm now realizing that Vagrant is a VM that's designed to maintain consistency between developers so there's never a situation where you have one guy saying, "it works on my box."

But if that's the case, I don't understand why I'm running into a situation where I run into "Fatal error: Class 'PDFlib' not found in /vagrant/html/application/helpers/StatementImager/AbstractStatementPDFGenerator.php on line 74." Does it not make sense that if my VM is a clone of the server environment that the actual app runs on that I would have the necessary libraries and extensions installed by default?

I'm going to go ahead and close this question. Thanks for your feedback. I'm now trying to learn how I can set up and run a phpinfo(); page in Code Igniter. That's the framework I'm using on my local box that's tied into the Vagrant environment. I'm thinking if I can see where it's pulling all of it's configurations from I can figure this out a lot quicker. Thanks!
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41726780
Thanks for the points and good luck.  I don't run any VMs at all.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
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.

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

20 Experts available now in Live!

Get 1:1 Help Now