Re: popen() (was Re: Followup (Re: "Can't check path..."))

Eric <[email protected]> Mon, 13 Nov 2006 10:51:59 -0500
Newsgroups gmane.comp.horde.chora
Message-ID <[email protected]>
At 10:42 PM 11/12/2006, Chuck Hagenbuch wrote:

 >> http://www.php.net/phpinfo

Wow, that phpinfo sure puts out a lot of info.  :-)

Aha!  There it is.  HOME = /root, big as life.

WHAT in the world is apache's HOME doing pointed at /root???  (...other 
than the fact that httpd is started by root and switched to the apache user 
and group in the httpd.conf file...)

I have added the following to the /etc/rc.d/init.d/httpd start/stop script:

start() {
         echo $HOME                # Added just to confirm that
                                             # /root really is the initial HOME
         export HOME=/home/apache  # Added
         echo $HOME                # Added to verify that HOME
                                             #really did get changed
# Everything below this line was there out of the box.
         echo -n $"Starting $prog: "
         check13 || exit 1
         daemon $httpd $OPTIONS
         RETVAL=$?
         echo
         [ $RETVAL = 0 ] && touch ${lockfile}
         return $RETVAL
}

I also added a /home/apache directory and made it owned by the apache user 
and group, just to have someplace for chora to reference (pretty sure I 
didn't want to leave it referenced at /var/www).

It seems that that has Fixed The Problem ... now chora works as 
advertised.  :-)

Have others had this same problem?  I didn't find it in the archives.  My 
apache configuration is pretty much out-of-the-box except I had to disable 
startup in the initial system startup scripts and add it to 
/etc/rc.d/rc.local, because some other things had to finish initializing 
first (mostly, I had to mount some drives and start up a bunch of virtual 
hosts) before I could start httpd.  I wonder if that's what did it to me...

I know this next question is a bit off-topic for this list but... Is 
modifying the httpd startup script the "right" way to do this, or is there 
another way that's better?

Chuck, to you and Jan, thank you very much for your help.  :-)

Hopefully I'll be able to return the favor sometime.


-- 
Chora mailing list - Join the hunt: http://horde.org/bounties/#chora
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]