PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 30, 2022

[FIXED] How to add pear to my project

 August 30, 2022     pear, php     No comments   

Issue

Right now I am using PEAR on local host and it is installed in the PHP folder. I changed include_path and used PEAR and there is no problem. But I'm working on my own framework which i want to be an standalone folder. lets say i want to install my framework on 10 WebServers. Do i need to install PEAR 10 times for all Servers ?

Is there an easier way to combine pear into my project as i want it to be an standalone folder.

Can i just simply copy pear folder to my project folder and include it from there ? or i need to install pear every time i want to use is ?

Thanks for reading my question


Solution

You can use pear project-local just like composer. Those files can be checked in and distributed with your software:

$ pear config-create `pwd` pear.conf
$ pear -c pear.conf install http_request2

Now you just have to set the include path to $dir/pear/php/ and that's it.

Whenever you need to upgrade/install, use pear -c pear.conf $command.



Answered By - cweiske
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing