I found out that I can fix the problem by calling php with its
absolute path in cake/console/cake:

From:
exec php -q ${LIB}cake.php -working "${APP}" "$@"

To:
exec /usr/local/bin/php -q ${LIB}cake.php -working "${APP}" "$@"

However, I do not like that solution because it changes Cake core.

Anyone any clue? Thanks!

On Dec 6, 11:01 pm, "[email protected]" <[email protected]> wrote:
> Hi all,
>
> I followed the instructions 
> onhttp://book.cakephp.org/view/1110/Running-Shells-as-cronjobs
> and I still ran into a strange problem while running my shell in
> cronjob.
>
> I am getting error when I try to use model in the shell:
>
> Fatal error: Call to undefined function mysql_query() in /home/
> cake1.3.6/cake/libs/model/datasources/dbo/dbo_mysql.php on line 600
>
> The shell runs fine if I just fire it up manually. What can't PHP see
> mysql_query() when it's done in a shell via cronjob?
>
> Thank you.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to