Well, I thought that if i just ran it through the browser to test it, that it would turn out the same way. I've never ran a script from the CLI before. Its only a database backup program that uses mysqldump and the php date() function to assign the new file name. Here is what I would like to run from the CLI by using a cron job:
#!/usr/local/bin/php -q
<?php
$filename = './backup/' . date('D-M-j-o') . $database . '.sql';
echo shell_exec ('mysqldump.exe --add-drop-table -u user -ppassword database > ' . $filename);
?>
When the script is run through Cron, I get the following error in an email:
Usage: php [options] [-f] <file> [args...]
php [options] -r <code> [args...]
php [options] [-- args...]
-a Run interactively
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>.
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-r <code> Run PHP <code> without using script tags <?..?>
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
args... Arguments passed to script. Use -- args when first argument
starts with - or script is read from stdin