Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange make/php/apache problem.



So I'm working on a Continuous Integration system (a centralized system to
check out source code, build it, unit test it, and report the results.  It can
schedule jobs, or run them on demand).  I'm writing it in PHP, in a way where
it can be run  either from the command line, or through apache (mod_php5),
using the exact same PHP script.

I ran into one bit of trouble already where the commands worked fine on the
CLI, but running it through apache gave strange results, and I finally figured
out the build working directory had to be somewhere under the DocumentRoot
(prolly an selinux thing.  Gawd I hate selinux.).  Moved the build dir, and
got past that problem.

Now I'm integrating a project called ddd (not the debugger front end), and
getting much stranger results.  The checkout works fine, but the make does
not.

Here is the Makefile target, with some debugging lines added:

depend:
	pwd
	ls -ald src/message
	cd src/message
	cd src/message && $(MAKE)
	cd src && $(MAKE) depend
	touch Makefile.dep

Run on the command line by me, I get:
make[1]: Entering directory `/var/www/html/builds/DDD/trunk'
pwd
/var/www/html/builds/DDD/trunk
ls -ald src/message
drwxrwxrwx  3 apache apache 4096 Dec 29 15:37 src/message
cd src/message
cd src/message && make
make[2]: Entering directory `/var/www/html/builds/DDD/trunk/src/message'
mkdir ../include/generated_messages
(etc)

Run through apache, I get:
make[1]: Entering directory `/var/www/html/builds/DDD/trunk'
pwd
/var/www/html/builds/DDD/trunk
ls -ald src/message
drwxrwxrwx  3 apache apache 4096 Dec 29 15:48 src/message
cd src/message
/bin/sh: line 0: cd: src/message: Not a directory
make[1]: *** [depend] Error 1
make[1]: Leaving directory `/var/www/html/builds/DDD/trunk'
make: *** [Makefile.dep] Error 2


You will notice that:
1) src/messages was a directory a nanosecond ago
2) It is owned by apache, group apache
3) It is 777 (as is its parent)

I also tried hard-coding the absolute path and got the same thing.

WTH could cause that?  Any thoughts?

Thanks in advance.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org