Jump to content

Why won't this wrapper run my script?


toasty

Recommended Posts

Here's the code I've been screwing with for way-too-long.
[code]#! /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;[/code]

The code I'm trying to run [color=orange]php script.php -u http://www.__________.com/test/ -r ;[/color] works fine and executes without a hitch from the shell.  however when I run it - [b]attempt to run it[/b] - from a browser by means of the wrapper file I continually get [color=red]Script completed with exit code 127[/color].  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.
Link to comment
https://forums.phpfreaks.com/topic/25004-why-wont-this-wrapper-run-my-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.