i would like some explanations.
i have a script
<?php
//mailing script here
?>
i have add the CRON job from my cpanel for every day.
- i was getting : Permission denied (then i added “wget http://domain.com/performance_cron/daily.php > /dev/null” before the php tags and it is working). is that the best solution?
- the jobs are being saved in my root directory “/” before public HTML. is this a good thing? or i how can i change the saving directory?
- finally i am getting “2: Syntax error: “(” unexpected” though the job is being done.
Thanks
wget path/to/php > /dev/nullif PHP installed as CGI try adding
#!/usr/local/bin/phpas a first line in php script,befor starting
<?phptag. (“#!/usr/local/bin/php” = path to php executable)"(" unexpected"is a error in php code, try to resolve it.