PEAR included with MAMP: how to access via Terminal? - terminal

I'm trying to run a command that downloads a bit of software using PEAR installed with MAMP.
Here's the command I run in Terminal:
pear channel-discover pear.phpdoc.org
The Terminal responds with:
-bash: pear: command not found
Could someone please advise how to access PEAR that comes pre-installed with MAMP?
Path to MAMP on my Mac is /Applications/MAMP/

I do not use mamp but i think you can find the pear here:
/Applications/MAMP/bin/php5.3/bin/pear
you can simply add some alias to make it shorter, something like
alias mamppear="/Applications/MAMP/bin/php5.3/bin/pear"

Related

How to get VScode terminal to use packages installed on Mac terminal via composer

I installed composer using home brew on my Utilities terminal on my Mac.
When I try to use packages installed through composer, I get that it isn't installed. For example, I can run laravel new appname in the Mac terminal, but it won't let me run it in VScode terminal (using zsh). I get the error zsh: command not found: laravel.
Can someone help so that the VScode terminal uses the packages installed in my Mac terminal?
My /etc/paths file looks like this:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Users/melaniecarr/.composer/vendor/bin
You need to add the relevant directories to your PATH in ~/.zshenv. Try which laravel in the shell that works to see what directories you need to add. E.g.:
❯ which watch
/usr/local/bin/watch
❯ export PATH="/usr/local/bin:$PATH" # needs to be in ~/.zshenv to be permanent

ZSH: Command not found - after update macOS to 10.15.1

Yesterday I was using all my installed packages without any problem such as mysql, composer, php, brew and co...
However, today I started my MacBook and typed mysql and I got: zsh: command not found: mysql. Not even brew is working anymore and I don't know why.. this is my .zshrc config file and I don't know why it isn't working.
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:~/.composer/vendor/bin:$PATH
Any ideas how to fix this?
Yuck, how did that happen? Try this:
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
Whether this works is going to depend on where you have been installing user executables. If you're using homebrew, I would expect it to be /usr/local/bin but perhaps it is something different in your case? You might want to try putting /usr/local/bin first so things installed by homebrew get picked up before the defaults in /usr/bin and /bin (this is what I do, and I'm still alive to talk about it...)
You could also change your default shell back to Bash:
brew install bash
echo '/usr/local/bin/bash' >> /etc/shells
chsh
You might need to use sudo on line 2.

El Capitan pear command not found

I am new to mac and am trying to get pear to run from the terminal.
All the scripts are added to the MAMP folder and if I run:
$ sudo /Applications/MAMP/bin/php/php5.6.10/bin/pear
everything is fine.
However, if I run $sudo pear or pear I get a message: "pear command not found"
My $PATH variable looks like this:
/Applications/MAMP/bin/php/php5.6.10/bin/pear:/usr/bin:/bin:/usr/sbin:/sbin:
When I look for pear with $ locate bin/pear I get the same location as in the path:
/Applications/MAMP/bin/php/php5.6.10/bin/pear
Any idea what can be wrong?
Copied -- in essence -- from a comment:
Th $PATH environment variable should contain a list of directories to be searched for a command. Having the executable itself as part of the path doesn't help with resolving its location.

Installing SASS through my terminal on my MAC -newbie

I have done multiple searches for installing SASS through my terminal on my Mac, when I write the command gem install sass, it tells me
-bash: $: command not found"
so I tried the alternative sudo install process. My result is
-bash: $: command not found".
Am I missing something here?
Sorry for the dumb question. I'm just a web designer/developer trying to learn SASS, I did get a response once telling me this "WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type "man sudo" for more information. To proceed, enter your password, or type Ctrl-C to abort. Password:"(My typing was correct) so I type my PW. it then tells me it's the wrong PW. - I have one PW on this machine. What am I doing wrong?
I did get this error message after a third try " You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
Jasons-MacBook-Pro:~ JHess$ "
Do I not have the right permissions set up to perform the SASS install? I found a similar question on Stack regarding this issue - and it told me to install RVM. What exactly is RVM? Is it some type of bundled package?
Any help would be GREATLY appreciated. I just attended a web conference in VA, "ConvergeRVA" and just recently graduated college, I'm not a seasoned vet like most peeps on here. But I would love to start learning SASS.
Note: I am running Mac OS X Lion 10.7.5
In order to use Sass you need Ruby installed. The error messages shows you have an old version 1.8.7
Update to a current version using RVM.
RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments
Copy and paste this into your terminal.
\curl -sSL https://get.rvm.io | bash -s stable --ruby
look at http://screencasts.org/episodes/how-to-use-rvm to learn how to use it.
After this is done try gem install sass again
You haven't installed Mac OS X Command Line Tools. It can be found at:
Xcode > Preferences > Downloads > Command Line Tool
Download & Install it, and restart the Terminal.

How to use Pear with xampp?

How do i include Pear's QuickForm into a php file if Pear is already installed in xampp?
I ran go-pear.bat from the command line, and it ran a setup program to configure my system for PEAR.
When it was finished I was left with some new folders and a pear.bat file. I tested it with "pear install -f Text_CAPTCHA" and everything seemed to work.

Resources