0

I have set cron for indexing issue. but i have got error in mail.

/home/ltfab/public_html/shell/indexer.php: line 1: ?php: No such file or directory
/home/ltfab/public_html/shell/indexer.php: line 2: /backup: Is a directory
/home/ltfab/public_html/shell/indexer.php: line 3: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 4: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 5: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 6: access-logs: command not found
/home/ltfab/public_html/shell/indexer.php: line 7: syntax error near unexpected token `('
/home/ltfab/public_html/shell/indexer.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)'

Any Expert Please help i have try some solution but no luck with this.

2 Answers 2

0

Solution - https://stackoverflow.com/questions/4633739/i-got-error-while-run-cron-job-using-php-how-to-i-fixed-it

Use: * * * * * /usr/bin/php5 /path/to/the/script.php

0

Seems you have a syntax error in /home/ltfab/public_html/shell/indexer.php If you look closer at your email it is trying to execute the doc comment block in the PHP file. Most probably the opening PHP tag is missing < sign.

/home/ltfab/public_html/shell/indexer.php: line 1: ?php: No such file or directory

-- UPDATED --

OR

You are trying to execute PHP file as a shell script. Try updating your Cron job to

* * * * * php /home/ltfab/public_html/shell/indexer.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.