Author |
Message |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Tue Feb 10, 2009 3:20 pm |
|
This Ms-Analysis Cron Job script broke under RN2.3, was working under RN until then. Probably something simple with the include path but after a few attempts no luck, so here I am
modules/MS_Analysis/include/cronmaintenance.php
Code:global $prefix, $db;
// Set time limit and ignore user abort
if( !get_cfg_var('safe_mode') )
{
@set_time_limit( 300 );
@ignore_user_abort( 1 );
}
// Next setting ($forum_admin) is needed so that PHP-Nuke finds the required files in the correct path
define('FORUM_ADMIN', true);
require_once("../../../config.php");
require_once("../../../db/db.php");
// END: Next setting ($forum_admin) is needed so that PHP-Nuke finds the required files in the correct path
// Load Admin Settings
$result = $db->sql_query( "select curdate, staticupdate, GMT_offset, allow_pruning from $prefix"._msanalysis_admin." where id='1'" );
$MSArow = $db->sql_fetchrow( $result );
// Compose LOCAL Timestamp
$MSAdata[current] = -1 * ( date( "Z" ) / 3600 );
$MSAdata[zonedate] = mktime(date('H'), date('i'), date('s'), date('n'), date('j'), date('Y'), -1) + ( ( $MSAdata[current] + $MSArow[GMT_offset] ) * 3600 );
$MSAdata[logdate] = date( "Y-m-d H:i:s", $MSAdata[zonedate] );
$MSAdata[slogdate] = date( "Y-m-d", $MSAdata[zonedate] );
// Set last update time
$db->sql_query( "update $prefix"._msanalysis_admin." set lastupdate = '$MSAdata[logdate]' where id='1'" );
// Carry out maintenance every hour (by cron deamon)
if( $MSArow[staticupdate] ) {
require_once( "class.maintenance.php" ); // Routine Classes for tracker
$msamainteneance = new msa_maintenance();
$msamainteneance->hourly_maintenance( $MSAdata[slogdate] );
}
// Every day default clear the hits for this day. If set, also prune MS-Tables
if( $MSAdata[slogdate] != $MSArow[curdate] ) {
if( $MSArow[staticupdate] ) {
// Set new logdate in Admin Table
$db->sql_query( "update $prefix"._msanalysis_admin." set curdate='$MSAdata[slogdate]' where id = '1'" );
require_once( "class.maintenance.php" ); // Routine Classes for tracker
$msamainteneance = new msa_maintenance( );
$msamainteneance->daily_maintenance( );
if( $MSArow[allow_pruning] ) $msamainteneance->pruning_maintenance( );
}
}
unset( $MSAdata );
|
Heres the full download if needed Only registered users can see links on this board! Get registered or login! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Feb 10, 2009 9:58 pm |
|
Forum files moved, and your error log will most likely tell you the exact problem, which might be outside this script. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 10, 2009 11:58 pm |
|
thanks, that gives me a place to start ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 12, 2009 7:23 am |
|
well it ended up being that the script is calling config.php directly without calling mainfile, so it wasnt loading rnconfig, as per this post: http://www.ravenphpscripts.com/postt16768.html
changing line 95 in config.php to
if(!defined('INCLUDE_PATH')) define('INCLUDE_PATH', '');
got it working again |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 12, 2009 7:41 am |
|
I'm wondering if that might affect your other functions. Maybe you could add that line to the msanalysis script before it includes config.php? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Feb 12, 2009 8:30 am |
|
yes that worked and is a much better solution ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
draxx
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 19, 2003
Posts: 282
|
Posted:
Mon Apr 13, 2009 5:08 pm |
|
I loved it but MS Analysis is soooooooo insecure you do know that right? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Sun Jul 15, 2012 8:17 am |
|
Is it safe this one to install it with the last RavenNuke version? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 15, 2012 10:27 am |
|
I'm not sure what version you are using, but I played with v2.3 pro for awhile, and it still had many cases of full path disclosure. There were also several known issues and I'm not sure how many were fixed before the script was no longer supported. I myself would not use it without making a bunch of changes. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
KennyW
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 15, 2004
Posts: 44
|
Posted:
Tue Jul 17, 2012 4:53 pm |
|
MS Analysis Brings back some memories havent seen this in many years just got to test it out again,many thanks for the link to download it Spasticdonkey |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
chatserv
Member Emeritus
![](modules/Forums/images/avatars/Risque/fhf215.jpg)
Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Wed Sep 11, 2013 12:45 am |
|
At a quick glance it seemed to me that admin files, (at least the files that i checked), are storing data into the DB without much variable checking or filtering. But i didn't view all files, filtering could be taking place on some included file. Either way i'm guessing some old abandoned modules might have fallen behind if no one took over. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
draxx
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Sep 15, 2013 1:09 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Nov 18, 2013 5:14 am |
|
Is there any future for this module? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Wed Nov 20, 2013 5:56 pm |
|
Unlikely seeing as it has been unsupported for a few years now. You can find most information any way either through the Statistics module or through your hosting control panel. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|