1

I am on a Mac running Yosemite 10.10.4 and every time I start terminal or open a new terminal tab I am inside of an actively running php process. I must Ctrl+C before I can do anything else. I don’t see any Mac terminal options that is automatically starting this process.

I have Homebrew installed and I’m using a LEMP stack, so I’m not sure if there is some misconfiguration there? I’ve searched everywhere, tried running brew doctor and brew update, but everything is ready to brew and up to date.

Here is my terminal output when starting a new session:

 Last login: Thu Aug 20 13:31:52 on ttys000
 ^C
 MacBook-Pro:~ adam2k$

And my php version:

 MacBook-Pro:~ adam2k$ php -v
 PHP 5.6.6 (cli) (built: Mar  5 2015 19:48:00) (DEBUG)
 Copyright (c) 1997-2015 The PHP Group
 Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
 MacBook-Pro:~ adam2k$ 
7
  • What does the general page of Terminal preferences show?
    – mmmmmm
    Aug 20, 2015 at 18:08
  • @Mark - it shows - On Startup Open: New Window with Profile: Pro - Shells Open with: Default login shell - New Windows Open with: Default Profile, Default Working Directory - New Tabs Open with: Same Profile, Same Working Directory
    – adam2k
    Aug 20, 2015 at 19:10
  • In System Preferences, select users and right click on its name. "Advanced options..." will appear. and that will show default shell - what is there? (You might need to enable editing)
    – mmmmmm
    Aug 20, 2015 at 19:28
  • pr equivalently from the command line ` dscl . -read /Users/username UserShell` making the obvious change
    – mmmmmm
    Aug 20, 2015 at 19:30
  • OK then what do the startup scripts ~/.bash_login ~/.profile etc show One of them probably start php
    – mmmmmm
    Aug 21, 2015 at 13:00

1 Answer 1

1

The default shell that Terminal starts is found by running the command:

dscl . -read /Users/username UserShell

Making the obvious change.

The current Mac OS X default shell is /bin/bash. This runs various startup files including ~/.bash_profile. Search these for PHP code and remove that line.

PHP can be started manually in a terminal but its main use is in a web server as an Apache (or other web server) plugin.

0

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