Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to Insert a File Using Text Editor

Posted on 2016-10-29
9
Medium Priority
?
143 Views
Last Modified: 2016-11-03
I'm using Vagrant, which, because it's a self contained OS, requires me to make some changes to the php.ini file using a Text Editor.

I say, "Text Editor," though I'm not really sure what the difference is between "Command Prompt," "Shell," and "Command Prompt." I do know that there are different commands in "Command Prompt" than the Cygdrive tool I'm using, but I can't tell you why or what the difference is.

I'm installing PDFlib (https://www.pdflib.com/). I've got it working on my WAMP server so I know that I have to:

add a line to php.ini file
add the php_pdflib.dll to my extension_dir
add the PDFLib.php file to the PHP

I'm figuring out the VI dynamic, as far as adding text to the php.ini file, but how to you add a file?

Right now when I list the files I see in the file referenced as the extension_dir, I see this:

so files
I'm a little concerned that I don't see any .dll files. Still, I know from past experience this is where the php_pdflib.dll file goes. How do I move it using a Command Line dynamic?

Thanks!
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
  • 3
  • 3
  • 2
  • +1
9 Comments
 

Author Comment

by:brucegust
ID: 41865576
Just to add a little clarification on the last part of the question: When I look in my WAMP extension directory, I see nothing but .dll files. I don't know if the abundance and exclusivity of the .so files are unique to Vagrant, but I thought it worth mentioning in case someone saw that as a red flag.
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 700 total points
ID: 41865614
".so files" are 'shared object' files found in Linux.  Vagrant runs in a VM and looks like it is basically a linux machine.  Your DLL files aren't going to work with it.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41865642
PDFLib is available for many operating systems other than Windows.
https://www.pdflib.com/download/pdflib-family/pdflib/
0
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!

 
LVL 59

Accepted Solution

by:
Julian Hansen earned 1000 total points
ID: 41865644
DLL's are windows only - you can't put them on a Linux system.

You will need the Linux version of PDFLib

Page 7 of the install manual covers the installation process
http://www.pdflib.com/fileadmin/pdflib/pdf/support/PDFlib-in-PHP-HowTo.pdf

You need to
a) Get the PHP version of PDF for Linux (x86 / x64) - depends on what PHP version you are running
b) Extract
c) Find the .so file as per the doc
d) Copy  the .so file to the extensions folder.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 300 total points
ID: 41865792
You may be able to save yourself a lot of configuration work if you use Bitnami.  
https://bitnami.com/stack/lamp

VirtualBox or VMWare setup is a little fiddly and configuration-driven, but once you've got that it's dasy to create, remove, modify your LAMP stacks.  A lot of the drudgery can be automated.
https://bitnami.com/stack/lamp/virtual-machine
0
 

Author Comment

by:brucegust
ID: 41866315
Guys! As always, thank you so much. One of the reasons I'm such an advocate for EE is the fact that you're not just getting the "what," but also the "why."

Dave and Julian - I will get the necessary SO files. I know exactly what you're talking about, but I completely overlooked the fact that Vagrant is going to be a Linux dynamic which changes a number of things.

Ray - anytime you make a recommendation, I'm always taking notes, even if your suggestion doesn't translate to something I can use right then and there. I've got to stick with Vagrant, just because that's the work environment that I've been asked to work in as per my job situation. Wanted to make sure you had some context so when I didn't respond by taking your suggestion in this instance, you knew why.

One thing continues to allude me, however: I'm using a "Shell" to boot Vagrant up and it's through this same Shell that I can see the php.ini file. I can't access is using Windows Explorer because it's a part of the Virtual Machine environment. I can edit the php.ini file using a VI interface, but how do I copy and paste files into a VM dynamic if the only way I can access it is through the Shell?

Also, I want to clarify some things as far as a Text Editor, the Command Prompt and the Shell. If you're so inclined, please see: https://www.experts-exchange.com/questions/28979903/What's-the-Difference-Between-a-VI-the-Command-Prompt-and-a-Shell.html

Thanks!
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 700 total points
ID: 41866375
According to this page https://www.vagrantup.com/docs/getting-started/ ,  Vagrant installs Ubuntu 12.04 LTS 64-bit as the default OS.  And Vagrant apparently uses VirtualBox as the default VM.  No where does it say it but apparently Vagrant is a manager of sorts that loads other packages in a VM.
0
 
LVL 59

Assisted Solution

by:Julian Hansen
Julian Hansen earned 1000 total points
ID: 41866468
The benefit of Vagrant over Bitnami is that Vagrant allows you to store your source code on the host and through the Vagrant config files you map that source into the VM when Vagrant loads. This allows you to maintain your source files on your host machine and not buried in a VM.
0
 

Author Comment

by:brucegust
ID: 41872664
Gentlemen, I'm going to go ahead and wrap this question up. While I've not completely solved this dilemma, I'm pretty certain that I can upload what I need to the appropriate directory using my terminal application. Should I run into any more difficulties, rest assured you'll see another question on EE.

Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
The viewer will learn how to dynamically set the form action using jQuery.
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.
Suggested Courses

610 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