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

Tuesday, August 30, 2022

[FIXED] How to properly use both pear and pear2 packages?

 August 30, 2022     pear, php, pyrus     No comments   

Issue

I've set my pear installation inside my project:

php pyrus.phar mypear c:\apache24\htdocs\my-project\vendor

But it creates the following folder structure:

.configsnapshots
docs
downloads
php <---------- Here is where pyrus is installing pear + pear2 packages
tests
.pear2registry

Then, should I just add \my-project\vendor\php to my include_path and just require the clases?


Solution

PEAR packages not only ship PHP code, but also unit tests, documentation and data files (e.g. font files for barcodes or figlets). The directory structure you see is the result of this separation.

So yes, add the php dir to your include path and start requiring the files. You may also simply use a PSR-0 compatible autoloader.



Answered By - cweiske
Answer Checked By - Pedro (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