Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6914057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:17:55+00:00 2026-05-27T09:17:55+00:00

Can you walk me through the installation of a library for php, specifically what

  • 0

Can you walk me through the installation of a library for php, specifically what each terminal command does?

I have been learning web development for 6 months and it is time I need the console / terminal. I can’t find any beginner walkthrough of using the terminal to add libraries and plugins to PHP. There are a lot of tutorials for specific steps or errors, but none start to finish.

If you want specifics to make your example concrete, here is what I am trying to install:

The library I am installing: http://code.google.com/p/phpquery/.

My directory for PHP on MAMP: /Applications/MAMP/bin/php/php5.3.6/bin

Thanks!
Don

edit:
I figured out my specific issue, but I don’t think I really understand what I did, so I can’t repeat it by myself in any other situation. This thread can help a lot of new terminal users including myself. The type of response I am looking for would go like this:

Step 1: Open your terminal. (This is an alternative way to navigate and execute commands on files on your computer).

Step 2: Find out where MAMP is installed however you like. Then go to your terminal, and type in cd followed by the path. cd stands for current directory and tells your terminal where it should execute its commands. The command you use will be very similar to this cd /Applications/MAMP. This will make your current directory MAMP.

Step 3: You are adding a library to PHP. So you need to go to the PHP folder in MAMP…. (please help us from this part!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:17:56+00:00Added an answer on May 27, 2026 at 9:17 am

    I just checked and it is available in pear channels.

    # this is from their site
    pear channel-discover phpquery-pear.appspot.com  
    pear install phpquery/phpQuery
    

    Of course, for Mac using MAMP, you would use commands like this:

    /Applications/MAMP/bin/php5/bin/pear install [package]
    

    So for PHPQuery, try this:

    /Applications/MAMP/bin/php5/bin/pear channel-discover phpquery-pear.appspot.com
    /Applications/MAMP/bin/php5/bin/pear install phpquery/phpQuery
    

    Same method should apply to pecl extensions as well.

    EDIT

    I personally just installed it on mine to test, here were my results:

    $ /Applications/MAMP/bin/php5/bin/pear channel-discover phpquery-pear.appspot.com
    Adding Channel "phpquery-pear.appspot.com" succeeded
    Discovery of channel "phpquery-pear.appspot.com" succeeded
    $ /Applications/MAMP/bin/php5/bin/pear install phpquery/phpQuery
    downloading phpQuery-0.9.5.386-pear.tgz ...
    Starting to download phpQuery-0.9.5.386-pear.tgz (100,990 bytes)
    ......................done: 100,990 bytes
    install ok: channel://phpquery-pear.appspot.com/phpQuery-0.9.5.386
    

    This should work with any PEAR or PECL extension. Check out this page for a list of PEAR packages.

    EDIT 2

    Make sure /Applications/MAMP/bin/php5/lib/php is in your include path! That is where phpQuery.php will be located once you’ve downloaded the PEAR packages properly with MAMP.


    EDIT 3

    Per cshu’s comment, he mentioned that these packages are no longer maintained and that you should use this instead:

    $ /Applications/MAMP/bin/php5/bin/pear channel-discover pear.querypath.org 
    $ /Applications/MAMP/bin/php5/bin/pear install querypath/QueryPath
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jung.sourceforge.net/ Can someone walk through the steps carefully for me? I have been trying
Does anyone have a walk through/example/blog of how I can dynamically create the item
I have the report with lots of sub-reports within. How can I walk through
I have been developing web apps (primarily) using php and a bit of python,
I want to know that How can I walk through this loop ? this
Can someone walk me through how to 'hide' the standard core data setters? I
Can someone point me to a [relatively] simple walk-through on how to properly configure
Task: Cut or erase a file after first walk-through. i have an install file
I'm trying to walk through a bunch of items, each item has an array
I'm making a maze game. The character can't walk through the walls of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.