Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 1, 2006, 5:11 pm
rate this thread
I have problems running a couple of shell scripts from PHP. I found a
posting, so I posted my question to the original author. But
original author is not at the address anymore. Anyone can help with the
---------- Forwarded message ----------
Date: Wed, 01 Feb 2006 16:55:49 +0000
Subject: Re: Problem calling a shell script
Hi, I have a similar problem now. I am wondering whether you have found
solution to the above. My script looks like the following:
"export JAVA_HOME=/usr/java/jdk1.5.0\n" .
"cd /opt/softwares/archive_system/nutchwax\n" .
"ls -l\n" .
"/bin/sh bin/indexarcs.sh -d
/opt/softwares/archive_system/archive_data/heritrix -n\n" .
"ls -l\n" .
/usr/tomcat/jakarta-tomcat-5.5.8/bin/catalina.sh stop\n" .
/usr/tomcat/jakarta-tomcat-5.5.8/bin/catalina.sh start\n" ;
$fp = popen($cmd, 'r');
$read = fread($fp, 10240);
However, it seems it would run until the first "ls -l", but it got
stuck on the "/bin/sh bin/indexarcs.sh ..." step. The bin/indexarcs.sh
has around 300 lines of sh commands.