Jump to content


Photo

Why won't this wrapper run my script?


  • Please log in to reply
1 reply to this topic

#1 toasty

toasty
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 25 October 2006 - 12:43 AM

Here's the code I've been screwing with for way-too-long.
#! /bin/sh
echo "Content-type: text/plain";
echo;
cd "${SITE_ROOT}/path_to_folder_of_script";
"php script.php -u http://www.__________.com/test/ -r";
echo "Script completed with exit code $?.";
exit 0;

The code I'm trying to run php script.php -u http://www.__________.com/test/ -r ; works fine and executes without a hitch from the shell.  however when I run it - attempt to run it - from a browser by means of the wrapper file I continually get Script completed with exit code 127.  The code in question is a command line reindexing for my site's search engine.

Any ideas?  This has been driving me insane for the past three days.

#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 25 October 2006 - 02:41 AM

Removing the double quotes around the php command should help.  The other double quotes can stay.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users