Announcement

Collapse
No announcement yet.

How To Fix the 1969-12-31 Date Bug for User Record Fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tubedogg
    replied
    That script will not update user's last visit dates. That script is to fix an old bug with the way UBB thread/post dates were imported. The bug no longer exists and that script is now irrelevant.

    Regarding this issue, whatever forum you imported from obviously did not store the user's last visit date in the database, making them all 0 which in the world of UNIX timestamps = 01.01.1970 or 12.31.1969 depending what system you're using.

    In regards to all your questions the answer is yes. There is no "solution" to this "bug" because beyond making up last visit dates, vB can't pull them out of thin air if your previous forum did not store them somewhere.

    Leave a comment:


  • BKG
    replied
    Fixed the typo, called the same fixubbupdate.php from within fixubbupdate.php:

    Fiex line 5 to:

    echo("If you have a backup, <a href=\"fixubbupdate.php?action=doconvert\">click here</a> to proceed.");

    Execution of script gave this on browser display:

    Line inserted on purpose
    Rows in result: 0

    The above display shows that the script is running alright. But something is still missing, we do not see any date changes taking place for last visit date.

    Can *anything* be done at this point?

    What happens if we let the current 12/31/69 date remain as is? Would this be updated when the specific member visits the site?

    A check for the admin user shows that:

    Join Date, Last Visit Date, and Last Activity Date are showing alright. This suggests that when any activity happens, its date automatically gets updated for that user. Right?

    The Last Post Date is showing as 1969-12-31 19:00:00 even though there has not been any posting of messages so far. This means that when any activity does not happen, the default date sits in the field until that activity occurs. Right?

    The same logic also explains why for other users Join Date is showing alright, but Last Visit, Last Activity, and Last Post are set to default 1969-12-31 19:00:00. These fields will be automatically updated when any user visits, posts or does some activity. Right?

    Should that mean that we should continue further beyond this stagnant stage in which vB has been for more than a week and open it for registration of new users and for posting messages and doing activities? Any better solutions?

    I believe anything is better than doing nothing at this point. Looking forward to your response. - bk

    Leave a comment:


  • Steve Machol
    replied
    That must have been a typo. Just rename the script fixubbdate.php.

    Leave a comment:


  • BKG
    replied
    Missing File fixubbdate.php listed in your script fixubbupdate.php

    Eureka! Here is why the script fixubbupdate.php (I checked the code of the last version posted in prior message):

    It refers to file fixubbdate.php and there is no file of that name available???

    See on line 5:

    echo("If you have a backup, <a href=\"fixubbdate.php?action=doconvert\">click here</a> to proceed.");

    Please advise where to get the fixubbdate.php script that you are calling from within fixubbupdate.php and in which directory to include it once I get it from you. Thanks. - bkg

    Leave a comment:


  • Steve Machol
    replied
    If your forums are working with 644 permissions then there is no reason my that script would need to be set to 755. In truth I have no idea why this script didn't work for you. It worked fine for me when I used it a year ago.

    Leave a comment:


  • BKG
    replied
    Our hosting tech support suggested that we need to set the permissions for the fixubbupdate.php to executable. [The permissions of all our default .php scripts for admin are set to -rw-r--r-- i.e. 644].

    <b>Question</b>: Do we really need to change all our .php scripts from 644 to 755 (executable)?

    Well, for the above script, we did change the permission to 755 and ran it again, and it seems the script was executed, but here is the text we got on the next browser screen:

    Line inserted on purpose
    Rows in result: 0

    (The first line is perhaps a debugging line)

    <b>Question</b>: Is this what we are expected to get from executing fixubbupdate.php?

    On checking some of the user data, we find the last visit date is still set to 1969-12-31.

    What to do next? - bkg

    Leave a comment:


  • Steve Machol
    replied
    I have no recommendations on a workaround. However my concern is that since a simple php script like this doesn't work on your server, you may run into other problems and anomalies. For instance what if you needed to repair your database. Given your expience with this script will you run into similar problems rinning repair.php? I hope your host is a good one and will help you fix this problem.

    Leave a comment:


  • BKG
    replied
    Thank you for your earlier inputs, smachol, PPN and Ed.

    Please advise if there is any workaround - instead of running the script from the browser. For example, how about replacing / changing the values of the specific user field data using MySQL? What is the process for doing so? As we need to just reinitialize the field to a valid value (instead of the 12/31/1969), this should be a possiblity. Or, how about downloading the data table and alterning a field and uploading it back on the server? I believe that we are only trying to change values in one column of a data table. Will truly appreciate your inputs on workarounds suggested above - through MySQL commands or a direct table edit.

    In the meanwhile, we are also trying to determine if it is indeed a server level issue. - bkg

    Leave a comment:


  • Mike Sullivan
    replied
    What you're doing is fine. The error your getting (as you mentioned) is equivalent to a 404. Not much we can really suggest; if you're sure you have the path right and the file shows up in FTP, I'd recommend contacting your host.

    Leave a comment:


  • BKG
    replied
    Permissions are ok - set to 644.

    Quick question, would appreciate your reply.

    How exactly does one run this script from the browser?

    I am typing in the browser window:

    http://www.mydomain.com/path/admin/fixubbupdate.php

    and hitting enter. Does one need to pass any parameters by putting something after adding a ? to the URL end. - bkg

    Leave a comment:


  • Steve Machol
    replied
    I just ran this exact script on my test forum and it worked perfectly. No 'line 0' errors or any other errors for that matter. (I'm running PHP 4.2.1) The only other thing I can think of is that the file permissions may be off. Try chmoding it to 644. If that doesn't work then it's got to be something wrong on the server level.

    Leave a comment:


  • BKG
    replied
    No, this script did not work either.

    This error seems to be a fatal error indicating that the script was not found [even though it is there]:

    Fatal error: Unable to open /usr/www/users/net/forums/admin/fixubbdate.php in - on line 0
    No input file specified.

    A search on any search engine such as Google shows that this is a fairly common error. The question is if it is because of some php bug. Or if the php is unable to read the database files. Is there any option for furnning this by typing from the command line (instead of running from the browser).

    Will appreciate your inputs. - bkg

    Leave a comment:


  • Steve Machol
    replied
    Try this one.

    Leave a comment:


  • BKG
    replied
    Please find the file enclosed as .php attachment. - bkg

    Leave a comment:


  • Steve Machol
    replied
    I meant post the file as an attachment.

    Leave a comment:

Related Topics

Collapse

Working...
X