Two versions of Apache when only one is really there

I am running a localhost on a Mac, and had Mac’s install of Apache and PHP that I am using to develop.

I mistakenly installed a second version of Apache using Macports, but have since uninstalled it. Even though I uninstalled it, it is still showing up…

Barry-Horbals-iMac:~ barryhjames$ ps ax | grep httpd
50402   ??  Ss     0:00.40 /opt/local/apache2/bin/httpd -k start
50404   ??  S      0:00.03 /opt/local/apache2/bin/httpd -k start
50405   ??  S      0:00.03 /opt/local/apache2/bin/httpd -k start
50406   ??  S      0:00.02 /opt/local/apache2/bin/httpd -k start
50407   ??  S      0:00.03 /opt/local/apache2/bin/httpd -k start
51201   ??  S      0:00.01 /opt/local/apache2/bin/httpd -k start
51232   ??  S      0:00.09 /opt/local/apache2/bin/httpd -k start
51339   ??  S      0:00.02 /opt/local/apache2/bin/httpd -k start
51340   ??  S      0:00.02 /opt/local/apache2/bin/httpd -k start
51341   ??  S      0:00.02 /opt/local/apache2/bin/httpd -k start
51350   ??  S      0:00.01 /opt/local/apache2/bin/httpd -k start
 8208 s000  R+     0:00.00 grep httpd

All of the files for this extra Apache are gone, but even when I go to phpinfo.php on my server, it tells me that the server root is the old version that I uninstalled.

I really would like when I put sudo apachectl restart in the Terminal for the original version of Apache to be used that came with the Mac. Is there any way I can do this without starting from scratch and re-compiling?

Any help would be much appreciated!


That sounds like a “service” problem. Since I’m not familiar with Macs any more, I can only point you at the services which are running on your Mac and suggest that you turn them off, one at a time (so you get the correct one), and delete the undesirable service.

Of course, if that fails, uninstall both versions (hard if the uninstall files were also deleted) and then reinstall only one.