|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
i tried to set it up, but didnt succeed. i keep getting this message in my e-mail inbox. root: not found help?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
What's the entry in your crontab for running doexpire.pl?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
my file is called cronjobs and it's located in the root directory. this is whats inside it.
0 2 * * * root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl 0 1 * * * /usr/local/bin/vnukelog
i've also got a file below it called crontab.save and inside it is this
0 2 * * * root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl
logout
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Try removing "root" from the entry. I don't know why Infopop's documentation says to put that in. P.S. This is my 700th post, so I'm now an "old hand"
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
lol oldhand! 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.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
[]P.S. This is my 700th post, so I'm now an "old hand" [/] Congrats Old Hand!
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
ok, that didn't work. whats next?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
btw, when i get the e-mail saying it dont work, this is always in the subject line, if it's any help. Cron <nickjenk> root /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Are you sure you removed the "root" from the crontab entry?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
positive although my file is called cronjobs not crontab, that make a difference?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Hmmmm ...... If "root" isn't in the cron table entry, then I don't know where it's getting the "root" from. 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. 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.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
hmmm, thats strange. i just did the command crontab -l and it still says tjhe "root" bit is there. but i just downloaded the file to check. do i need to re-run something?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
my bad! i didnt rebuild it it now says what it should i'll let u know 2moro whether it was a success or not!
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
well, we're getting somewhere!! this is the report as of this morning usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl: permission denied what does it mean? (apart from that access was denied )
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I am NOT the cron job expert. Somehow I got it working on my server. LOL
But, Can you successfully run the file from the command line?
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.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
how would i run it from command line? whats the command?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Try changing the cron table entry to:
0 2 * * * perl /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
that doesnt work Can't open perl script "/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl": Permission denied
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
[]how would i run it from command line? whats the command? [/]
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.
If not, it's most likely a permissions thing.
[]/usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.pl[/] Actually looking at your command...... 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.
Some hosts don't let Perl scripts run elsewhere.
Or should you be running doexpire.php??? What file(s) is actually in the /ubbthreads/cron/php directory?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
ahhhh, well spotted joshpet! i had php/doexpire.pl no such thing! so i've amended it to php/doexpire.php and guess what, it wont bloody install! i'm now completley stumped. This is what is in my cronjobs file [] 0 2 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/php/doexpire.php 0 1 * * * /usr/local/bin/vnukelog [/] and this is the error message i'm getting from telnet [] "cronjobs":3: bad day-of-month crontab: errors in crontab file, can't install[/] wtf??
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
You're not very good at this cron stuff, are you. Maybe should just get up at 2AM every day, and run the script manually. P.S. Congrats to Josh for spotting that error. I never noticed the discrepency between the .pl file extension and the php subdirectory.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
lol, u could write what i know about cron on the back of a stamp!
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
sooo, any clues as to why it's not letting me compile? (if thats the right word)
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
ok, managed it i deleted the original crontab, removed it from the server. uploaded new one, and it installed. will find out later if it works or not!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
<fingers crossed in suspense >
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Can you run yourdomain/ubbthreads/cron/php/doexpire.php in your browser? You wont' receive any output... but it would tell you if permissions into those directories was correct. Check the permissions not only on the file.. but make sure the permissions for those directories are allowing you to access it as well. Otherwise... I give us. <shrug>
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
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)?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
if i type php -v i get: php: command not found
how do i run something from the command line joshpet? i know it's not run, i just tried! I went to the cron/php folder and typed in doexpire.php and i got command not found.
Last edited by monkeyra; 11/07/2002 3:14 PM.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
if i type php -v i get: php: command not found
Ok, that means that either the static PHP binary is not installed on your server, or else it's not in the default path.
What happens when you use the command "which php"?
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
lol, all these questions i ask has turned me into a journeyman! anyway, when i type in which php i get: php: command not found (surprise surprise, this is turning out to be the story of my life! "Monkeyra and his lost commands!")
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
I'd say you have two choices.
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.
2) Use the Perl version doexpire.pl, assuming you have Perl installed. Run "perl -v" to check that.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
perl -v works! i'll go try that now! (pleaaaaaaaaaaaaaaaase!)
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
[]I went to the cron/php folder and typed in doexpire.php and i got command not found. [/] That would be running it. Simply typing in the command yourself. 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. Dave is probably the expert here. I am truly the novice with Cron jobs... but have a few tricks to check which sometimes work.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
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.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
i cant get my cronjob to install now! this is doing my nut!! can you guys see anything worng with these two lines?
[] * 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl * 2 * * * /usr/local/bin/vnukelog [/]
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
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: ./doexpire.php
But in this case it won't work anyway, since php-scripts have to be run via the php binary as stated before.
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
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:
0 1 * * * /usr/local/etc/httpd/htdocs/ubbthreads/cron/perl/doexpire.pl
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.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
that doesnt work either! i'm at a loss to understand why, it installed ok a few days ago i cant run from command either, i just tried i get command not found. although perl -v works
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
"perl doexpire.pl" doesn't work?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|