shell_exec giving error
Posted: Wed May 25, 2005 1:43 pm
I have to run certain scripts nightly. Instead of having 5 different cron jobs, I want to place all of the calls to the scripts in one single script. I can run cron jobs on each file by itself and I can run each file by itself from the command line. But when I try and run a file from inside another script I get the error "No Input File Specified". Below are examples of 2 different ways that I have tried to run the programs. I tried the script on another server and it worked. Does anyone have any ideas?
<?php
// Import activated into discount table
$output = shell_exec('/usr/bin/php /foo/foo/import.php');
echo $output;
?>
<?php
// Import activated into discount table
$output = shell_exec('/usr/bin/php -f /foo/foo/import.php');
echo $output;
?>
<?php
// Import activated into discount table
$output = shell_exec('/usr/bin/php /foo/foo/import.php');
echo $output;
?>
<?php
// Import activated into discount table
$output = shell_exec('/usr/bin/php -f /foo/foo/import.php');
echo $output;
?>