The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Automatically closing threads
I Currently am working with this PHP Script to close threads older than a year, but I can't seem to get it to work, on my command line, I can type
php closethreads.php and it goes on w/o error, but the threads don't lock.. I constructed this with a little bit of other codes i've found on here.. Any help is greatly appreciated! PHP Code:
|
#2
|
|||
|
|||
hmm...
I assume you've included global.php etc? can you post the entire script, maybe it's something earlier in it because that query looks great to me. If your admin set error reporting to none by default then it wouldn't show any errors. My admin did that once...worst developing environment ever. |
#3
|
|||
|
|||
OOpsie, Thanks for the reply! I thought I had copied the whole script, but guess not, lol.. I run my own server, so I can luckily configure everything needed for debugging. I should mention this is for vB2.3.5 - Here's what my entire script looks like.. :classic:
PHP Code:
|
#4
|
|||
|
|||
hmm... maybe global.php won't let you use it outside of a browser... try this instead.
PHP Code:
|
#5
|
|||
|
|||
Hmm.. Still no go That code is definately a lot better looking though. It's definitely got me baffled, lol.. I really appreciate your help!! I'm learning the way around MySQL pretty good, but not quite well enough, lol
PHP Code:
Code:
[root@ball vb]# php closethreads.php [root@ball vb]# |
#6
|
||||
|
||||
There will be no output unless you echo something out ...
|
#7
|
|||
|
|||
yeah, there shouldn't be output with that script, though it should update your database.
at the end of it if you want confirmation then add the line. Or whatever you want it to say Code:
echo "Script Completed"; |
#8
|
|||
|
|||
I did do that just to confirm, but for some weird reason, the threads still don't get closed. I'm baffled, lol. If I go look in phpMySQLadmin the real old threads still all show 1 (open) so I did a search for 0, and they were threads that were already closed.. Any possible suggestions as to why nothing will update??
thanks again, i'll check back in the morning! |
#9
|
|||
|
|||
whooops...
here try this instead PHP Code:
|
#10
|
||||
|
||||
If you're using vB3 take a look at one of the files in the includes/cron directory. Put your script you have at the top in a new file in that directory. And add it as a scheduled task
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|