Jump to content

Archived

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

toasty

Why won't this wrapper run my script?

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.

Share this post


Link to post
Share on other sites
Removing the double quotes around the php command should help.  The other double quotes can stay.

Share this post


Link to post
Share on other sites

×

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.