Announcement

Collapse
No announcement yet.

mktime errors after 4.2.2 upgrade php 5.4.17

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

  • eam
    replied
    I had my ads set to display at certain times and I turned that off and changed it to display always if no criteria are set and that seems to have cleared the errors. I decided that I didn't really need to have them display only at certain times, but if anyone has a time-based criteria specified for an ad and it's active they will probably get this error until there is a fix.

    Leave a comment:


  • eam
    replied
    Originally posted by Pogo View Post
    You can try to change mktime() and gmmktime() to time() in includes/functions_ad.php and includes/functions_notice.php.

    mktime() and gmmktime() are both used once in each file. So all in all you need to make 4 changes.
    I also made the prescribed changes and it did not clear up the problem. I noticed there are more than one of each in each file.

    In functions_ad.php:

    Code:
    {
                                if ($criteria['condition3'])
                                {
                                    $conditional_prefix .= '<vb:if condition="$now = gmmktime()"></vb:if>';
                                    $conditional_prefix .= '<vb:if condition="$end = gmmktime(' . $end_time[1] . ',' . $end_time[2] . ')"></vb:if>';
                                    $conditional_prefix .= '<vb:if condition="$start = gmmktime(' . $start_time[1] . ',' . $start_time[2] . ')"></vb:if>';
                                }
                                else
                                {
                                    $conditional_prefix .= '<vb:if condition="$now = mktime()"></vb:if>';
                                    $conditional_prefix .= '<vb:if condition="$end = mktime(' . $end_time[1] . ',' . $end_time[2] . ') + $vboptions[\'hourdiff\']"></vb:if>';
                                    $conditional_prefix .= '<vb:if condition="$start = mktime(' . $start_time[1] . ',' . $start_time[2] . ') + $vboptions[\'hourdiff\']"></vb:if>';
                                }
                                $conditional_prefix .= '<vb:if condition="$now >= $start AND $now <= $end">';
                                $conditional_postfix .= '</vb:if>';
                            }
    in functions_notice.php:

    Code:
                            {
                                $start = mktime($start_time[1], $start_time[2]) + $vbulletin->options['hourdiff'];
                                $end   = mktime($end_time[1], $end_time[2]) + $vbulletin->options['hourdiff'];
                                $now   = mktime() + $vbulletin->options['hourdiff'];
                            }
                            else // utc
                            {
                                $start = gmmktime($start_time[1], $start_time[2]);
                                $end   = gmmktime($end_time[1], $end_time[2]);
                                $now   = gmmktime();
                            }
    Would it help to change *all* references of mktime and gmmktime to time? I don't want to just do it without checking.

    Otherwise, what else can be done here?

    Leave a comment:


  • kushal
    replied
    The vbseo errors resolved with update to 3.6.1 from 3.6.0

    Thanks for the help

    Leave a comment:


  • demios
    replied
    To fix the error with VBSEO you need to:

    1) edit /vbseo/includes/functions_vbseo-pre.php
    2) on line 181 find: function path($type = '')
    3) replace with: public static function path($type = '')
    4) save file.

    Done

    Leave a comment:


  • kushal
    replied
    Changing the value in both the file didn't work. I changed the gmmtime and mtime to to simply time(). Same errors persist.

    Leave a comment:


  • kushal
    replied
    Yes I know, if there is something you can point me to as to what us the fundamental change that happened from 4.1 to 4.2 that broke vbseo existing code, I shall be better able to isolate the issue Thanks

    Leave a comment:


  • Mark.B
    replied
    Originally posted by kushal View Post
    Ok thanks shall do. Also any help in vbseo issue why it got broke in 4.2.2?
    We can't provide for support for vBSEO, it's not our code. Sorry.
    Last edited by Mark.B; Wed 9 Oct '13, 4:39am.

    Leave a comment:


  • kushal
    replied
    Ok thanks shall do. Also any help in vbseo issue why it got broke in 4.2.2?

    Leave a comment:


  • Pogo
    replied
    You can try to change mktime() and gmmktime() to time() in includes/functions_ad.php and includes/functions_notice.php.

    mktime() and gmmktime() are both used once in each file. So all in all you need to make 4 changes.

    Leave a comment:


  • kushal
    replied
    Yes the issue with time goes away. What is the work around? Will we have to disable the ads completely? Also our vbseo errors don't go away. Warning: Non-static method vBSEO_Storage:ath() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387 Warning: Non-static method vBSEO_Storage:ath() should not be called statically in ..../vbseo/includes/functions_vbseo_pre.php on line 387

    Leave a comment:


  • Pogo
    replied
    Disable all your in vBulletin configured ads and notices and try again.

    Leave a comment:


  • kushal
    replied
    No change.. Only the message from vbseo errors dissapear. This error remains the same. I tried uploading the files in ASCII mode too but no use.

    Leave a comment:


  • Zachery
    replied
    What happens when you disable your third party addons?

    Leave a comment:


  • kushal
    started a topic [Forum] mktime errors after 4.2.2 upgrade php 5.4.17

    mktime errors after 4.2.2 upgrade php 5.4.17

    Dear all,


    Apart from errors for vbseo following errors appear over after our upgrade. The host advice to use time function instead of mktime. Any suggestion how we can get it corrected?

    Warning: mktime(): You should be using the time() function instead in ..../includes/class_core.php(4715) : eval()'d code on line 1

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X