php forum
php mysql forum
php mysql smarty
 
Page 1 of 4 1 2 3 4 >
Topic Options
#227225 - 11/03/02 02:34 PM help with CRON pls, namely doexpire.pl
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
i tried to set it up, but didnt succeed.<br />i keep getting this message in my e-mail inbox.<br />root: not found<br /> <br />help?

Top
#227226 - 11/03/02 02:42 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
What's the entry in your crontab for running doexpire.pl?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227227 - 11/03/02 02:48 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
my file is called cronjobs and it's located in the root directory.<br />this is whats inside it.<br /><br />0 2 * * * root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl<br />0 1 * * * /usr/local/bin/vnukelog <br /><br /><br /><br />i've also got a file below it called crontab.save and inside it is this<br /><br />0 2 * * * root <br />/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl<br /><br />logout<br /><br />

Top
#227228 - 11/03/02 02:52 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Try removing "root" from the entry. I don't know why Infopop's documentation says to put that in.<br /><br />P.S. This is my 700th post, so I'm now an "old hand" <img src="/forum/images/graemlins/laugh.gif" alt="" />
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227229 - 11/03/02 03:02 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
lol oldhand!<br />ok, i'll give that a go and get back to you 2moro once the time has reached for it to carry out the task.<br />

Top
#227230 - 11/03/02 04:45 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]P.S. This is my 700th post, so I'm now an "old hand" <br />[/]<br /><br />Congrats Old Hand! <img src="/forum/images/graemlins/laugh.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227231 - 11/04/02 12:43 AM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
ok, that didn't work.<br />whats next?

Top
#227232 - 11/04/02 12:44 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
btw, when i get the e-mail saying it dont work, this is always in the subject line, if it's any help.<br />Cron <nickjenk> root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl

Top
#227233 - 11/04/02 02:11 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Are you sure you removed the "root" from the crontab entry?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227234 - 11/04/02 11:12 AM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
positive<br />although my file is called cronjobs not crontab, that make a difference?

Top
#227235 - 11/04/02 11:36 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Hmmmm ...... If "root" isn't in the cron table entry, then I don't know where it's getting the "root" from.<br /><br />On my server (Linux Redhat 7.0), I set up cron jobs using the crontab command. For example, crontab -l lists the cron table for the current user, and crontab FILENAME rebuilds the cron table from the text file FILENAME. Maybe it works differently on your server.<br /><br />If no one else has any ideas here, you might try asking in the UBB.threads How Do I? or Installation Assistance forum at Infopop Community.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227236 - 11/04/02 11:42 AM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
hmmm, thats strange.<br />i just did the command crontab -l and it still says tjhe "root" bit is there.<br />but i just downloaded the file to check.<br />do i need to re-run something?

Top
#227237 - 11/04/02 11:49 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
my bad!<br />i didnt rebuild it<br />it now says what it should<br />i'll let u know 2moro whether it was a success or not!

Top
#227238 - 11/05/02 11:03 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
well, we're getting somewhere!!<br /><br />this is the report as of this morning<br /><br />usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl: permission denied<br /><br /><br />what does it mean? (apart from that access was denied <img src="/forum/images/graemlins/smile.gif" alt="" /> )

Top
#227239 - 11/05/02 11:14 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I am NOT the cron job expert. Somehow I got it working on my server. LOL<br /><br />But, Can you successfully run the file from the command line?<br /><br />I'd check that first... make sure it runs for you. That'll narrow down if it's a permission thing, or a cron job thing.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227240 - 11/05/02 11:24 AM Re: help with CRON pls, namely doexpire.pl [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
how would i run it from command line?<br />whats the command?

Top
#227241 - 11/05/02 01:14 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Try changing the cron table entry to:<br /><br />0 2 * * * perl /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227242 - 11/06/02 12:43 AM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
that doesnt work <img src="/forum/images/graemlins/frown.gif" alt="" /><br />Can't open perl script "/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl": Permission denied<br />

Top
#227243 - 11/06/02 12:54 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]how would i run it from command line?<br />whats the command?<br />[/]<br /><br />If you've got telnet or SSH access to the server... you could go into that directory and type doexpire.pl at the prompt to see if you can run it.<br /><br />If not, it's most likely a permissions thing. <br /><br />[]/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl[/]<br />Actually looking at your command......<br />Are you allowed to have doexpire.pl inside the PHP directory.... in other words... on your server can you run perl scrips outside of the cgi-bin directory.<br /><br />Some hosts don't let Perl scripts run elsewhere.<br /><br />Or should you be running doexpire.php???<br />What file(s) is actually in the /ubbthreads/cron/php directory?
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227244 - 11/06/02 11:30 AM Re: help with CRON pls, namely doexpire.pl [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
ahhhh, well spotted joshpet!<br />i had php/doexpire.pl<br />no such thing!<br /><br />so i've amended it to php/doexpire.php<br /><br />and guess what, it wont bloody install! <img src="/forum/images/graemlins/mad.gif" alt="" /><br /><br />i'm now completley stumped.<br /><br />This is what is in my cronjobs file<br /><br /> [] 0 2 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.php<br />0 1 * * * /usr/local/bin/vnukelog [/] <br /><br /><br />and this is the error message i'm getting from telnet<br /><br /> [] "cronjobs":3: bad day-of-month<br />crontab: errors in crontab file, can't install[/] <br /><br />wtf?? <img src="/forum/images/graemlins/confused.gif" alt="" />

Top
#227245 - 11/06/02 11:47 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
You're not very good at this cron stuff, are you. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />Maybe should just get up at 2AM every day, and run the script manually. <img src="/forum/images/graemlins/wink.gif" alt="" /> <br /><br />P.S. Congrats to Josh for spotting that error. I never noticed the discrepency between the .pl file extension and the php subdirectory.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227246 - 11/06/02 12:12 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
lol, u could write what i know about cron on the back of a stamp! <img src="/forum/images/graemlins/cool.gif" alt="" />

Top
#227247 - 11/06/02 02:56 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
sooo, any clues as to why it's not letting me compile? (if thats the right word) <img src="/forum/images/graemlins/blush.gif" alt="" />

Top
#227248 - 11/07/02 12:58 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
ok, managed it<br />i deleted the original crontab, removed it from the server.<br />uploaded new one, and it installed.<br />will find out later if it works or not!<br />

Top
#227249 - 11/07/02 01:33 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
<fingers crossed in suspense <img src="/forum/images/graemlins/grin.gif" alt="" />>
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227250 - 11/07/02 11:08 AM Re: help with CRON pls, namely doexpire.pl [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
and no, permission denied.<br /> <img src="/forum/images/graemlins/frown.gif" alt="" /> <img src="/forum/images/graemlins/frown.gif" alt="" /> <img src="/forum/images/graemlins/frown.gif" alt="" />

Top
#227251 - 11/07/02 01:11 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Can you run<br /><br />yourdomain/ubbthreads/cron/php/doexpire.php in your browser?<br />You wont' receive any output... but it would tell you if permissions into those directories was correct.<br /><br />Check the permissions not only on the file.. but make sure the permissions for those directories are allowing you to access it as well. <br /><br />Otherwise... I give us. <img src="/forum/images/graemlins/tongue.gif" alt="" /> <br /><br /><shrug><br /><br /><img src="/forum/images/graemlins/frown.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227252 - 11/07/02 01:27 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Are you sure that the PHP static module, as well as the PHP Apache DSO, is installed on your server? What happens if you type "php -v" from the command line (telnet)?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227253 - 11/07/02 02:12 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
if i type php -v i get:<br />php: command not found<br /><br />how do i run something from the command line joshpet?<br />i know it's not run, i just tried! <br />I went to the cron/php folder and typed in doexpire.php and i got command not found.


Edited by monkeyra (11/07/02 02:14 PM)

Top
#227254 - 11/07/02 02:30 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
if i type php -v i get:<br />php: command not found<br /><br />Ok, that means that either the static PHP binary is not installed on your server, or else it's not in the default path.<br /><br />What happens when you use the command "which php"?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227255 - 11/07/02 02:52 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
lol, all these questions i ask has turned me into a journeyman! <img src="/forum/images/graemlins/smile.gif" alt="" /><br />anyway, when i type in which php i get:<br />php: command not found<br />(surprise surprise, this is turning out to be the story of my life!<br />"Monkeyra and his lost commands!")

Top
#227256 - 11/07/02 03:03 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
I'd say you have two choices.<br /><br />1) Download the PHP distribution from php.net and install it as a static executable. That would allow you to run PHP from the command line or from the cron table. The distribution includes documentation, but if you need additional help with that, I think there's some documentation on the Infopop Community site.<br /><br />2) Use the Perl version doexpire.pl, assuming you have Perl installed. Run "perl -v" to check that.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227257 - 11/07/02 03:08 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
perl -v works! <img src="/forum/images/graemlins/smile.gif" alt="" /><br />i'll go try that now!<br />(pleaaaaaaaaaaaaaaaase!)

Top
#227258 - 11/07/02 08:21 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
[]I went to the cron/php folder and typed in doexpire.php and i got command not found.<br />[/]<br /><br />That would be running it. Simply typing in the command yourself.<br /><br />I don't understand if the doexpire.php is in that directory.... why it would say "command not found".... unless that's "doexpire" running and failing with some command.<br /><br />Dave is probably the expert here. I am truly the novice with Cron jobs... but have a few tricks to check which sometimes work. <br /><br /><img src="/forum/images/graemlins/crazy.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#227259 - 11/07/02 09:11 PM Re: help with CRON pls, namely doexpire.pl [Re: Daine]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
To run doexpire.php from the command line, you would type in "php doexpire.php". At least, that's how I do it on my server. Of course, that won't work in this case, since the command-line version of PHP is apparently not installed on the server.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227260 - 11/08/02 12:50 AM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
i cant get my cronjob to install now!<br />this is doing my nut!!<br />can you guys see anything worng with these two lines?<br /><br /><br /> [] * 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl<br />* 2 * * * /usr/local/bin/vnukelog [/]

Top
#227261 - 11/08/02 12:50 AM Re: help with CRON pls, namely doexpire.pl [Re: Daine]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
The reason it says command not found when trying to run a program in the current directory from the command line is most probably because the current directory isn't in the path. Putting "./" in front of the command changes that, like so:<br />./doexpire.php<br /><br />But in this case it won't work anyway, since php-scripts have to be run via the php binary as stated before.
_________________________
/Gardener | Complete list of my mods

Top
#227262 - 11/08/02 12:57 AM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Maybe it doesn't like that you are using * for minutes, that means it will run every minute. Either way, it isn't a good idea to run the scripts so often, so you should start with a 0, like this:<br /><br />0 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl<br /><br />Have you made sure that the above command is working from the command-line? It's always a good thing to try that out first to rule out misspellings in paths or permission problems on the script.
_________________________
/Gardener | Complete list of my mods

Top
#227263 - 11/08/02 12:52 PM Re: help with CRON pls, namely doexpire.pl [Re: c0bra]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
that doesnt work either!<br />i'm at a loss to understand why, it installed ok a few days ago<br />i cant run from command either, i just tried<br />i get command not found.<br />although perl -v works<br />

Top
#227264 - 11/08/02 12:55 PM Re: help with CRON pls, namely doexpire.pl [Re: Luka_dup1]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
"perl doexpire.pl" doesn't work?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#227265 - 11/08/02 01:26 PM Re: help with CRON pls, namely doexpire.pl [Re: joeuser]
monkeyra Offline
Junior Member