Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

/Applications/MAMP/Library/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr‌​/local/git/bin:/usr/X11/bin:/usr/local/php5-20121126-100332/bin/php

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

share|improve this question

migrated from stackoverflow.com 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
1  
@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
add comment

1 Answer 1

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 http://www.macports.org to install php

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.