Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Tue Apr 30, 2013 3:59 am Reply with quote

Hi Montego. Just today I notice I wanted to add a new download but after filling on everything it says "New Download added to the Database" but later when I check it is not there and not even in the phpmyadmin database. I am runnning php 5.4. Do u have any suggestion? Shocked
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Apr 30, 2013 8:52 am Reply with quote

As we always suggest, you need to temporarily turn on error reporting to see what the error is. There are two types of error logging within RN: 1) PHP and 2) SQL.

In config.php, set $display_errors to true.
In rnconfig.php, make sure $loglevel is 1.
Make sure rnlogs/dblog file is write-able.

Note any PHP errors you see on the page while adding the download and check the dblog file for any database errors.

Is this in Submit Downloads where you are adding or straight through the Downloads admin?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
nuken
Newbie
Newbie



Joined: Mar 12, 2007
Posts: 24

PostPosted: Tue Apr 30, 2013 9:48 am Reply with quote

It is probably an error with the KCFinder if you are using that addon because the stock downloads module works fine with php 5.4 in all the tests I have done. Is this on a live site or a localhost? There have been Premature end of script headers errors on localhosts using KCFinder.

_________________
Tricked Out News 
View user's profile Send private message
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Tue Apr 30, 2013 5:25 pm Reply with quote

Hi guys, thanks for replying. I spend the whole afternoon testing and unfortunately I couldn't find any error. Maybe it is KCfinder but why failling right now if everything was working fine. The problem is I am not getting any error when I add any file with download module from administrator. I just check phpmyadmin database and it doesnt write any data in database. I will check again now but believe me, this is a very strange issues. Sad

nuke: this is live at bestbuildpc.org. Shocked
 
View user's profile Send private message Visit poster's website
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Tue Apr 30, 2013 7:01 pm Reply with quote

Yes I came back again doing the steps from montego I found this

*** YES, THIS IS A BLANK FILE - MAKE SURE PERMISSIONS ARE SET CORRECTLY SO IT CAN BE WRITTEN TO ***
www.bestbuildpc.org/home/db/mysqli.php - Line: 201
Code: 1136 - Message: Column count doesn't match value count at row 1
SQL was: INSERT INTO `nuke_nsngd_downloads` VALUES (NULL, '27', '0', '', '1')
Code: 1146 - Message: Table nuke_downloads_downloads' doesn't exist
SQL was: SELECT date FROM nuke_downloads_downloads order by date desc limit 1

www.bestbuildpc.org/home/db/mysqli.php - Line: 201
Code: 1146 - Message: Table nuke_downloads_downloads' doesn't exist
SQL was: SELECT date FROM nuke_downloads_downloads order by date desc limit 1

Shocked now I see nuke_downloads_downloads is missing in database but actually I don't use that. I can not find nuke_downloads_downloads neither.
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Tue Apr 30, 2013 10:39 pm Reply with quote

Your Submit Downloads modules isn't the one from the latest RN or my Download module, otherwise, those table names would not be showing in the log... Wink

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Wed May 01, 2013 6:01 am Reply with quote

I replace the whole module and I still have the same problem. I am getting crazy here. Sad

Edited: Montego I found this in my block-sommaire.php

Code:
            ////// ajout support NEW! automatique pour les modules de base.
            $new = ($newinthisgroup[$som_groupmenu][$keyinthisgroup]=="on") ? "<img src=\"$path_icon/admin/$imgnew\" border=\"0\" title=\""._SOMNEWCONTENT."\" alt=\""._SOMNEWCONTENT."\" />" : "" ;

            if ($nomdumodule=="Downloads" && $newdaysinthisgroup[$som_groupmenu][$keyinthisgroup]!="-1") {
               $where = (preg_match("/^cid=[0-9]*$/",$temponomdumodule[2])) ? " WHERE $temponomdumodule[2]" : "";
               $sqlimgnew="SELECT date FROM ".$prefix."_downloads_downloads".$where." order by date desc limit 1";
               $resultimgnew=$db->sql_query($sqlimgnew);
               $rowimgnew = $db->sql_fetchrow($resultimgnew);
               if ($rowimgnew['date']) {
                  preg_match ("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/", $rowimgnew['date'], $datetime);
                  $zedate = mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
                  //$now=time();
                  if(intval(($now-$zedate)/86400) <= $newdaysinthisgroup[$som_groupmenu][$keyinthisgroup]) {
                     $new="<img src=\"$path_icon/admin/$imgnew\" border=\"0\" title=\""._SOMNEWCONTENT."\" alt=\""._SOMNEWCONTENT."\" />";
                  }
               }
            }
            elseif ($nomdumodule=="Web_Links" && $newdaysinthisgroup[$som_groupmenu][$keyinthisgroup]!="-1") {
               $where = (preg_match("/^cid=[0-9]*$/",$temponomdumodule[2])) ? " WHERE $temponomdumodule[2]" : "";
               $sqlimgnew="SELECT date FROM ".$prefix."_links_links".$where." order by date desc limit 1";
               $resultimgnew=$db->sql_query($sqlimgnew);
               $rowimgnew = $db->sql_fetchrow($resultimgnew);
               if ($rowimgnew['date']) {
                  preg_match ("/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})/", $rowimgnew['date'], $datetime);
                  $zedate = mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
                  //$now=time();
                  if(intval(($now-$zedate)/86400) <= $newdaysinthisgroup[$som_groupmenu][$keyinthisgroup]) {
                     $new="<img src=\"$path_icon/admin/$imgnew\" border=\"0\" title=\""._SOMNEWCONTENT."\" alt=\""._SOMNEWCONTENT."\" />";
                  }
               }
            }


What do u think about it. I think I found why the error is saying _downloads_downloas doesn't exit but I didn't fix the download yet.

I was right Montego. it was the block-sommaire.php

I solved the problem. 1 month ago I've created a new field in order to have a new update picture when I upload a new file from the same kind of file. After deleting that field from nsngd_downloads the module works again. I wonder if it is possible to create a new file for any updates.
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu May 02, 2013 6:35 pm Reply with quote

Glad to hear you figured this out. I was actually going to ask you to post your table structure, but you've already figured out the issue.

Not sure what you mean by this:

Quote:

I wonder if it is possible to create a new file for any updates.


Can you expound upon this some more?

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
hicux
Newbie
Newbie



Joined: Jan 30, 2009
Posts: 92
Location: NL

PostPosted: Thu May 02, 2013 8:52 pm Reply with quote

Ok, I will try to explain better.

Image you have a file called Maya 1.0 but later u updated and then u have 1.1 but instead of getting a NEW red icon u get a UPDATED yello icon saying u updated the file. I hope u understand that. That is why I got some trouble because I tried to do it but I guess something went wrong. Wink
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri May 03, 2013 8:41 am Reply with quote

Since it is an existing download that you are "updating" to a new revision, the code is written so that it shows the UPDATED rather than NEW. This is by design.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous 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-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunch
linear-bunch