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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.