power cycle maybe  :)

-- veins
a bofh said: I too can bore you with useless encrypted keys...
"? ssa ruoy pu ti evohs dna yek pgp ruoy ekat uoy t'nod yhw"

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Hamlet" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, July 21, 2002 11:16 PM
Subject: Re: [PHP-DEV] running php script from cron with permissions


> On Sun, 21 Jul 2002, Hamlet wrote:
>
> > True. Somehow slipped my mind, now it works perfectly. PHP is awesome
for
> > system scripting.
>
> Just wondering... why would you want to reboot your machine from a cron
> job? :)
>
> Derick
>
> >
> > "David Eriksson" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > On Sun, 21 Jul 2002, Hamlet wrote:
> > >
> > > > Hi there,
> > > >
> > > > I've got a problem that's just a tidbit annoying. I've got a neat
little
> > php
> > > > script to keep my home network running. At one point in this script
it's
> > > > required to reboot the machine the script is running on, and this
I'm
> > trying
> > > > to do with exec("reboot").
> > > >
> > > > Now, I run the cron job as root, and if I try "php <?
exec("reboot"); ?>
> > > > from console it works fine. But not when cron tries to. I've got my
> > > > suspicions as to cron doing something kinky with the permissions,
and
> > > > therefore permissions are not enought for php to execute the reboot
> > command.
> > > >
> > > > I've been at this all day, suggestions are more than welcome.
> > >
> > > It's not certain that the "reboot" command is in your PATH environment
> > > variable when cron is running. Try adding a line similar to the one
below
> > > in the beginning of your cron script, or specify the full path when
you
> > > use exec() in PHP.
> > >
> > >   PATH="/bin:/usr/bin:/usr/sbin"
> > >
> > > Regards,
> > >
> > > -\- David Eriksson -/-
> > >
> > > "I personally refuse to use inferior tools because of ideology."
> > >                                                 - Linus Torvalds
> > >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --------------------------------------------------------------------------
-
>  Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
>  Frequent ranting: http://www.derickrethans.nl/
> --------------------------------------------------------------------------
-
>                  PHP: Scripting the Web - [EMAIL PROTECTED]
>                     All your branches are belong to me!
>                 SRM: Script Running Machine - www.vl-srm.net
> --------------------------------------------------------------------------
-
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to