$PATH - I'm not understanding something.

  • Truce
  • Guru
  • Guru
  • Truce
  • Posts: 1477
  • Loc: Washington DC

Post 3+ Months Ago

Code: [ Select ]
[root@files home]# httpd
-bash: /usr/sbin/httpd: No such file or directory
 
[root@files home]# which httpd
/usr/local/bin/httpd
 
[root@files home]# php -v
PHP 5.2.9 (cli) (built: May 29 2009 12:13:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
 
[root@files home]# which php
/usr/local/bin/php
  1. [root@files home]# httpd
  2. -bash: /usr/sbin/httpd: No such file or directory
  3.  
  4. [root@files home]# which httpd
  5. /usr/local/bin/httpd
  6.  
  7. [root@files home]# php -v
  8. PHP 5.2.9 (cli) (built: May 29 2009 12:13:03)
  9. Copyright (c) 1997-2009 The PHP Group
  10. Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
  11.  
  12. [root@files home]# which php
  13. /usr/local/bin/php


Okay so obviously I'm missing something. Why can I access php without a path prefix but not httpd? I'm pretty sure my understanding of the $PATH env variable is a bit off.

TIA.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

when you are doing php, to explain it simply you are calling up the php interpreter. httpd is a daemon, so it is a process that runs in the background. It is a program that you start and let it run for a while, serving up web pages to users.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 39 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.