Re: grr help with cron/shell tabs

2009-06-21 Thread Graham Weldon

Ensure that your environment variable PATH includes the path to the php 
executable.

Cheers,
Graham Weldon
http://grahamweldon.com



Miles J wrote:
> I found out that my CLI was PHP 4, so I changed it to PHP 5. I can run
> the cron through SSH manually, but when I run through cron I now get
> this error:
>
> TERM environment variable not set.
> /home/mileswj/cake/console/cake: line 30: exec: php: not found
> >
>   


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



Re: grr help with cron/shell tabs

2009-06-21 Thread Miles J

I found out that my CLI was PHP 4, so I changed it to PHP 5. I can run
the cron through SSH manually, but when I run through cron I now get
this error:

TERM environment variable not set.
/home/mileswj/cake/console/cake: line 30: exec: php: not found
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: grr help with cron/shell tabs

2009-06-16 Thread Marcelo Andrade

On Mon, Jun 15, 2009 at 5:25 AM, Miles J wrote:
> (..)
>
> Also tried using exec php -q and some other commands and nothing.

Have you installed php-cli?

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

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



Re: grr help with cron/shell tabs

2009-06-15 Thread Adam Royle

"cake" is a shell script which needs to be chmod'ed to 755 to allow being 
executed (also chmod +x will do that)

If you're getting the output of the file instead of it being executed, then 
it seems you're passing the script onto something else (such as the php 
interpreter) rather than executing it as a script.

Do you have command line access? If so, try it first manually before trying 
to run in cron.

Even if you try and run the shell script with no arguments you should get 
something.

btw, this is the full command to run (either in cron or manually, no 
linebreaks either):

/home/mileswj/cake/console/cake your_shell_name -app 
/home/mileswj/sc2armory.com/app/

Even if you run this manually, you should get a listing of the available 
shells:

/home/mileswj/cake/console/cake -app /home/mileswj/sc2armory.com/app/

If you don't have command line access it's possible that the control panel 
you're using is changing the command before entering into cron (such as 
prefixing it with path of php). If that is happening you might need to write 
a dummy php script that exec()'s your real command.

Cheers,
Adam

- Original Message - 
From: "Miles J" 
To: "CakePHP" 
Sent: Tuesday, June 16, 2009 10:02 AM
Subject: Re: grr help with cron/shell tabs


>
> Nope, still getting this:
>
> clear
>
> LIB=${0/%cake/}
> APP=`pwd`
>
> exec php -q ${LIB}cake.php -working "${APP}" "$@"
>
> exit;
>
> >
>
> 


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



Re: grr help with cron/shell tabs

2009-06-15 Thread Miles J

Nope, still getting this:

clear

LIB=${0/%cake/}
APP=`pwd`

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

exit;

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



Re: grr help with cron/shell tabs

2009-06-15 Thread Adam Royle

chmod +x /home/mileswj/cake/console/cake

then put this in cron

/home/mileswj/cake/console/cake your_shell_name -app /home/mileswj/
sc2armory.com/app/

Cheers,
Adam


On Jun 15, 6:25 pm, Miles J  wrote:
> Heres my current folder setup.
>
> /home/mileswj/cake/ (below root and shared between many apps)
> /home/mileswj/sc2armory.com/app/
> /home/mileswj/milesj.me/app/
> ... etc ...
>
> All the sites work correctly, im just trying to get a cron running on
> sc2armory. Ive tried all the following and none of them work.
>
> /usr/local/php5/bin/php /home/mileswj/cake/console/cake cron
> /usr/local/php5/bin/php /home/mileswj/cake/console/cake -app /home/
> mileswj/sc2armory.com/app/ cron
> /usr/local/php5/bin/php /home/mileswj/cake/console/cake -app "/home/
> mileswj/sc2armory.com/app/" cron
>
> All of those output this data into my email:
>
> clear
> LIB=${0/%cake/}
> APP=`pwd`
> exec php -q ${LIB}cake.php -working "${APP}" "$@"
> exit;
>
> Also tried using exec php -q and some other commands and nothing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---