Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set up Review Board to run under Apache on a Debian Linux machine. Apparently, when Review Board is running, it cannot find the p4 (perforce) executable because it is not "on the path". Which path gets used when Review Board (running from Apache) tries to spawn a child process? Is it www-data's? How can I add a directory to that path?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you're running squeeze (6.0), the PATH for apache is defined in the init script (/etc/init.d/apache2), on or about line 32 (search for PATH, it'll come up). On earlier versions of Debian, there's every chance that it's in much the same spot, but I don't have any of those machines laying around to check.

Changing it is, in theory, as simple as modifying that init script to add whatever you want. In practice, it's better if you don't mangle that script unnecessarily because it'll make upgrading just that little bit more difficult.

What would be best is either:

  • Place a symlink to p4 into /usr/local/bin -- simple, easy, get on with your life; or
  • modify Review Board's config to modify the path that it uses within the app. I'm not familiar with it, but it should be able to be modified to set a more appropriate path (especially given that perforce is unlikely to be in the minimal path apache provides on a lot of systems) -- honour the purity and sanctity of your system; be slowly driven insane.
share|improve this answer
    
Hmmmm, all the Review Board doc says on the subject is "To use Review Board with Perforce, you’ll first need to install p4 some place in your web server’s path (usually /usr/bin)." So it looks like either your first bullet or monkeying with /etc/init.d/apache2 are my options. –  SCFrench Jul 20 '11 at 0:31
    
I'd definitely go with the symlink; editing init scripts makes upgrade panda sad. –  womble Jul 20 '11 at 0:32

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.