I followed the instructions on http://book.cakephp.org/view/1110/Running-Shells-as-cronjobs and I still ran into a strange problem while running my shell in cronjob.
Ben kabuk modelini kullanmaya çalıştığınızda hata alıyorum:
Ölümcül hata: satır 600) (tanımsız işlev mysql_query Çağrı in / home/cake1.3.6/cake/libs/model/datasources/dbo/dbo_mysql.php
The shell runs fine if I just fire it up manually.
Why can't PHP see mysql_query() when it's done in a shell via cronjob?
I found out that I can fix the problem by calling php with its absolute path in cake/console/cake:
Gönderen:
exec php -q ${LIB}cake.php -working "${APP}" "$@"
Için:
exec /usr/local/bin/php -q ${LIB}cake.php -working "${APP}" "$@"
Bu Kek çekirdek değiştirir çünkü Ancak, bu çözüm sevmiyorum.
Herkes herhangi bir ipucu?
EDIT There was one answer from someone earlier and I replied saying that I was sure there was one copy of PHP binary but it turned out I was wrong! What happened to that answer as it just disappeared? Whoever that was please put the answer back and I'll give you point. Thanks!