You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 223 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Warning: mktime() expects parameter 1 to be long [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Baked Nut
Nuke Cadet
Nuke Cadet


Joined: May 02, 2006
Posts: 8

Location: Brisbane, Queensland, Australia

PostPosted: Sun Nov 11, 2007 5:16 am Reply with quoteBack to top

Any idea how to fix this ? or what it means....im getting it next to downlod links in phpnuke 7.8


Warning: mktime() expects parameter 1 to be long, string given in /modules/Downloads/index.php on line 1081

_________________
Visit Ozwebcity - Tech News, Community Gaming & Hosting.
Image
Find all posts by Baked NutView user's profileSend private messageVisit poster's websiteMSN Messenger
Saint
Nuke Soldier
Nuke Soldier


Joined: May 26, 2003
Posts: 13


PostPosted: Wed Aug 13, 2008 8:26 am Reply with quoteBack to top

See this post for a solution...
[url]http://www.clan-themes.co.uk/ftopict-3648-Warning--mktime---expects-parameter-1-to-be-long.html [/url]
Find all posts by SaintView user's profileSend private messageVisit poster's website
Divvy
Lieutenant
Lieutenant


Joined: Jul 25, 2004
Posts: 218


PostPosted: Tue Mar 03, 2009 10:42 am Reply with quoteBack to top

Hi guys,

I am using a different Downloads module, so the fix dont work for me...
Can someone help me? This is the error:
Quote:
Warning: mktime() expects parameter 1 to be long, string given in /home/enigmaw/public_html/tuga/modules/Downloads/index.php on line 798


line 798 is:
Code:
mktime ("LC_TIME", "$locale");


And full function:
Code:
function categorynewdownloadgraphic($cat) {
    global $prefix, $dbi, $module_name;
    $result_ns = sql_query("select ns_dl_newimage_on, ns_dl_new_one, ns_dl_new_two, ns_dl_new_three from ".$prefix."_ns_downloads_new_pop", $dbi);
    list($ns_dl_newimage_on, $ns_dl_new_one, $ns_dl_new_two, $ns_dl_new_three) = sql_fetch_row($result_ns, $dbi);
    if ($ns_dl_newimage_on == 1) {
   $ns_view_dis = ns_dl_admin_view(2);
    $newresult = sql_query("select date from ".$prefix."_downloads_downloads where cid='$cat' $ns_view_dis order by date desc limit 1", $dbi);
    list($time)=sql_fetch_row($newresult, $dbi);
    echo " ";
    mktime ("LC_TIME", "$locale");
    ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
    $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
    $datetime = ucfirst($datetime);         
    $startdate = time();
    $count = 0;
    while ($count <= $ns_dl_new_three) {
   $daysold = date(_NSDAY1, $startdate);
        if ("$daysold" == "$datetime") {
           if ($count <= $ns_dl_new_one) {
      echo "<img src=\"modules/$module_name/images/new_1.gif\" alt=\""._DCATNEWTODAY."\">";
       }
            if ($count <= $ns_dl_new_two && $count > $ns_dl_new_one) {
      echo "<img src=\"modules/$module_name/images/new_3.gif\" alt=\""._DCATLAST3DAYS."\">";
       }
            if ($count <= $ns_dl_new_three && $count > $ns_dl_new_two) {
      echo "<img src=\"modules/$module_name/images/new_7.gif\" alt=\""._DCATTHISWEEK."\">";
       }
   }
        $count++;
        $startdate = (time()-(86400 * $count));
    }
  }
}


Thank you Smile

_________________
Sexo - Thongs - Legendas Divx
Find all posts by DivvyView user's profileSend private message
perfect-games
Site Admin
Site Admin


Joined: Jun 18, 2004
Posts: 217


PostPosted: Tue Mar 10, 2009 1:57 pm Reply with quoteBack to top

hi there, this is not really a bug but as nuke is based on php3/php4 code alot of things have changed and nuke code has become outdated
as the function now required timezones as a quick fix you could add
date_default_timezone_set("America/Los_Angeles"); in mainfile.php
also check php.net and edit your function if you wish it to be strict
http://ca2.php.net/function.mktime

or you could just silence the error with @mktime ("LC_TIME", "$locale");

steve Smile
Find all posts by perfect-gamesView user's profileSend private messageSend e-mailVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.035 Seconds - 113 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::