vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   mktime() expects parameter 4 to be long... etc (https://vborg.vbsupport.ru/showthread.php?t=315339)

Outlaw Mantis 11-09-2014 03:05 PM

mktime() expects parameter 4 to be long... etc
 
I get this on profiles of users have not entered their birthday. I've searched in many threads and have not found any solution. I've tried moving users to and from usergroups, checking the database to find any erroneous birthday entries, which I did find, but upon correcting them I still get the error. I've seen several times that users who have investigated the error have determined it is not caused by plugins.

This error has been popping up since 2006. What could be causing it? It leaves a horrible space in the header and to the left of the forum, so of course, it's not something that can be ignored.

Dave 11-09-2014 03:07 PM

Can you post the full error here including the file name and line number?

kh99 11-09-2014 03:12 PM

Here's a thread that mentions it: http://www.vbulletin.com/forum/forum...r-4-to-be-long

I guess the solution there is to move the affected users to a new user group then back again. I also saw it mentioned that if you edit the user's profile in the admincp and save without changing anything, it will be fixed (although you have to do it for each affected user).

If you look in the database and see what the affected users have in their for their birthday, you might be able to figure out some SQL to fix it.

Outlaw Mantis 11-09-2014 03:29 PM

I couldn't post the full error in the title, but I guess I should have in the post.

Quote:

Warning: mktime() expects parameter 4 to be long, string given in ..../includes/class_userprofile.php on line 260
Yeah, I did that usergroup thing. It seems that every user without a birthday has the bug, and there are hundreds, but I could try it. It could be a bug in the MyBB to vBulletin converter. Here's what I have in phpMyAdmin:

https://vborg.vbsupport.ru/external/2014/11/17.jpg

Edit: By the way, I did the maintenance checks, including fixing user profiles.

kh99 11-09-2014 03:37 PM

Hmm...you could try
Code:

UPDATE user SET birthday='' WHERE birthday = '--'
Of course it's a little dangerous anytime you change the database like that, so if you don't feel comfortable then you may not want to do it, and if you do you should make sure you have a backup.

Dave 11-09-2014 03:40 PM

Maybe it works if you run the following query:
UPDATE user SET birthday = '' WHERE birthday = '--'

Backup the table/database first.

Edit: kh99 beat me to it.

Outlaw Mantis 11-09-2014 03:40 PM

So from this, it's safe to say it's probable that MyBB null fields for birthdays were "--" and vBulletin uses nothing? I'll make a backup and give it a try, thanks.

Dave 11-09-2014 03:57 PM

Probably because the converter found empty/bad dates and instead of something like 1970-01-01 it removed the numbers which left you with --.

Outlaw Mantis 11-09-2014 07:41 PM

It works. :) Ace, thanks guys. One quick question while I'm here. As a result of importing, each user has a "user note" saying "Imported user". Can all members view user notes? It doesn't look so welcoming to have an "Imported user" note on everybody's page. Any suggestions?

kh99 11-09-2014 07:55 PM

Normally everyone can't read the notes, but check in the usergroup manager in the "User Note Permissions" section. In my default setup, "User Notes Can Be Posted About This Group" is set to yes but everything else is no.


All times are GMT. The time now is 07:58 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
  • Page Generation 0.01468 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete