Well i just did what akitchin said.
if you're trying to run the file directly in a CRON, you need to add this line to the top:
// php here
this tells the command line to parse the following PHP code with the php engine (as far as i know), in quiet mode which suppresses the headers. the /usr/bin/php might need to change depending on your hosting setup. check phpinfo() for the proper path if this doesn't work.
But it worked fine for a few days then i started getting another error in my mailbox
This is the error
Error in argument 1, char 3: option not found Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>] php <file> [args...] -a Run interactively -C Do not chdir to the script's directory -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>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>.
Anyone understand this? If so any ideas to fix it?
Thanks for your time