![]() |
php script for usergroup promotion = users gets banned !!!
The cron jobs stopped working since a long time on my vbulletin 3.6.4 forum for an unknown reason, so i wrote my own script to promote the users to specific usergroups depending on their post number
Quote:
So: 1) What's wrong with my script and why does the users gets banned ? 2) How can i unban all users that were banned for no reason ? - In ModCP it doesn't show any information about the bans : ban date not available, "banned by" not available, lift date not available - In vb_userban table, only the users banned by my moderators are shown. The users that got banned automatically after being promoted by my php script are NOT displayed in this table. --------------- Added [DATE]1377018829[/DATE] at [TIME]1377018829[/TIME] --------------- Apparently lots of my users are saying that they are on the banlist but they can still post on the forum so i'm not sure what's happenning... Anyway, how can i promote users to a new group through a php script without putting the users on the banlist ? |
I think it would be better suited for the "coding forum" can a moderator move it to this forum ?
|
Quote:
|
Why wouldn't you fix the scheduled tasks instead of writing a custom script to only do one of the many things they do?
|
Quote:
Quote:
https://vborg.vbsupport.ru/showthread.php?t=299778 |
Quote:
|
Quote:
Code:
<img src="http://www.pirate-punk.net/cron.php?&rand=920528" alt="" width="1" height="1" border="0" /> This is the first thing i tried when i had problems with crons. I gave up and i wrote my own scripts. Just need to figure why the users end up being banned (and how to remove the users that were mass banned because of this script) I'm sure there is a vbulletin file i can include in my php script to use a vb function to promote my users to a new group without having them end up on the banlist. |
cron.php?&rand=920528" alt="" width="1" height="1" border="0"
In the code, the bolded should not be there. This breaks the string. And what you should actually have is a hook called, like this: HTML Code:
<!-- Do not remove $cronimage or your scheduled tasks will cease to function --> |
The code in my footer is
Code:
$cronimage |
What kind of trouble shooting have you done so far to see why the cron isnt running?
Is this a dedicate/vps server? |
Quote:
Crons are working if i launch them manually so its only a problem with the trigger / task sheduler It is a dedicated server. |
Can you upgrade to 3.8.7?
|
Quote:
|
Quote:
|
Quote:
The comments around it should, but not the actual $cronimage text |
Quote:
Quote:
|
Just as i figured, the dates are screwed, thats why they arent running, a date of 2008, they will never run.
Would require some server adjustments to fix that, but without knowing your server setup, hard to tell what is messing them up at this point. |
Quote:
|
Quote:
http://www.ni-dieu-ni-maitre.com/_uploads/vb2.jpg I don't think it is server problem - i am running 2 other vBulletin forums on the same dedicated server and i don't have any problems with the cron jobs. Also, all other dates are working fine in the forum (post dates, PM, etc) |
Ok, recheck that after a while & report what the Next Time is after another hour passes by, if they revert back to 2008, its a server issue.
Regardless of the other sites on the same server, this site is effected & yes i've corrected this issue previously, thats why i asked for the times. |
Edit and save each of them, and the difference between 3.6.8 and 3.8.x is pretty minor, I can't think of a good reason why'd they break between those versions.
Resaving each should trigger it to get a current rundate. |
Not entirely true Zachery, reason being once you manually run it, the date will change to the correct one, i've fixed this a few times in the past its not vbulletin, its the server & its setup, editing them will not fix the issue, they should go back to 2008 if its what i think it is, but again im not going to speculate on it as i dont know his setup.
|
I just ran the promotions cron job again and the next scheduled run is still "04/07/2013
03h01" hmmm weird.. |
Yea, its screwed, im guessing at this point if you leave it alone for a while, it will either resort back to 2008 or stay stuck there.
Unfortunately not knowing your server setup, i dont want to put you on a wild goose chase, but do this for now. As you have another forum setup, delete the user cron from the cron jobs, then add it back manually, get the settings from your other site or copy them. Then retest, see if it runs by itself or if it doesnt, report back the date/time its now stuck on. |
Quote:
|
Quote:
i can give you access to my server if you want to check, but i moved to a new dedicated server a few months ago and the old server had the same problem... |
To the original complaint of users who get promoted finding themselves banned - did I miss something or did anyone ask about usergroup settings for the new usergroup?
Settings like, "Is this a banned group? (Yes) (No)" It is under "Usergroup Options" in Usergroup manager, on the page where you adjust the settings. About 3/4 of the way down the page. It actually says: This Usergroup is not a 'Banned' Group (Setting this to no will cause the group to be treated as a banned group, this will prevent the sending of email notifications, show a banned error message on the permission error pages and other unspecified behaviors.) Yes No Do these users actually get promoted to the new group? Or do they stay in the same group they were in and are just banned? |
Quote:
Anyway i would still like to fix the cron job problem as it creates various other issues. For example VB doesn't do the regular "cleaning" anymore so sometimes my users can't connect to the forum because the table vb_session is full... I had to manually create a php cron job to periodically clear the table vb_session |
Quote:
Quote:
|
All times are GMT. The time now is 07:12 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|