Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Mac OS X 10.6.8. In Terminal, when I enter php -v, I get below message:

Last login: Sun Dec 16 20:22:05 on ttys000
You have mail.
-bash: e: command not found
~ $cd /
/ $php -v
-bash: php: command not found
/ $

My $PATH is:


When I type which php, I simply get an empty output.

share|improve this question

migrated from Dec 17 '12 at 3:51

This question came from our site for professional and enthusiast programmers.

It looks like there's more broken on your machine than just php. I also don't know and OS X that will display 'you have mail', I kinda doubt that the output of these commands are really on an OS X machine (are you ssh'ing into a different system?) – Evert Dec 17 '12 at 2:28
@Evert Cron jobs will send you mail by default and you'll see that message. (One can disable it by setting the email variable thing in their crontab to "", I think.) – arxanas Dec 17 '12 at 3:34
Thanks Waleed. I will keep trying. Evert, Thanks for your comments. I will keep checking – user1427195 Dec 17 '12 at 3:38
Does /usr/bin/php work? Did you change your bash profile? Actually, what did you do before it stopped working? – slhck Dec 17 '12 at 5:14

hm, that sucks. Showed up fine on my 10.7 machine using php -v or "which php".

You can always try "sudo find /usr/ -name php 2>/dev/null" to do a more complete search.

If it somehow got borked, you could use to install php

share|improve this answer
Thanks a lot. I will try and let you know. Thanks again – user1427195 Dec 17 '12 at 1:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .