Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Really need help with Strict Standards

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Really need help with Strict Standards

Postby serva » Sat Oct 06, 2012 11:54 pm

Hello all,

An anticipated thank you for your responses. I am getting a lot of strict standards error and i am kinda out of know-how on this. Please any helpful suggestion will be appreciated.

Strict Standards: Non-static method languages::getcurrent() should not be called statically in C:\xampp\htdocs\Maluu\include\include.php on line 61

The code is below. Thanks

Code: Select all
<?php 
$path=dirname(__FILE__); 
global $minimal; 
if(!file_exists($path.'/../config.php')) header("Location: install/"); 
require_once($path.'/../config.php'); 
if(!isset($config_abs_path) || !isset($config_live_site))  header("Location: install/"); 
require_once($config_abs_path.'/include/tables.php'); 
require_once($config_abs_path.'/classes/mysql.php'); 
require_once($config_abs_path.'/include/form.php'); 
require_once($config_abs_path.'/classes/languages.php'); 
require_once($config_abs_path.'/classes/common.php'); 
require_once($config_abs_path.'/classes/settings.php'); 
require_once($config_abs_path.'/include/seo.php'); 
require_once $config_abs_path."/include/vars.php"; 

if(!$minimal) { 
require_once($config_abs_path.'/include/util.php'); 
require_once($config_abs_path.'/classes/listings.php'); 
require_once($config_abs_path.'/classes/auth.php'); 
require_once($config_abs_path.'/classes/categories.php'); 
require_once($config_abs_path.'/classes/fields.php'); 
require_once($config_abs_path.'/classes/depending_fields.php'); 
require_once($config_abs_path.'/classes/fieldsets.php'); 
require_once($config_abs_path.'/classes/banners.php'); 


global $db; 
$db = new db_mysql(); 

if($db->error!='') header("Location: $config_live_site/offline.php"); 

global $crt_lang; 
global $crt_lang_name; 
global $crt_lang_flag; 


// set main domain   
global $main_domain; 
$main_domain = str_replace("http://www.", "", $config_live_site); 
$main_domain = str_replace("http://", "", $main_domain); 
if( (!strstr($main_domain, ".co.uk") && substr_count($main_domain, ".")>=2) || (strstr($main_domain, ".co.uk") && substr_count($main_domain, ".")>=3)) { 
    $arr = explode(".", $main_domain, 2); 
    $main_domain = $arr[1]; 

if(substr_count($main_domain, "/")>=1) { 
    $arr = explode("/",$main_domain,2); 
    $main_domain = $arr[0]; 


// set language using GET method 
if(isset($_GET['lang'])) { 
    $get_lang = escape(urldecode($_GET['lang'])); 
    if($get_lang != $_COOKIE['default_lang']) { 
        $expire = time() + 60*60*24*365; 
        setcookie("default_lang", $get_lang, $expire, "/", ".".$main_domain); 
        $crt_lang = $get_lang; 
    } 


// get current language 
$crt_lang = languages::getCurrent(); 
$lang=$config_abs_path.'/lang/'.$crt_lang.'.php'; 
if($crt_lang) { 
    $lang_arr = languages::getLanguage($crt_lang); 
    $crt_lang_name = $lang_arr['name']; 
    $crt_lang_flag = $lang_arr['image']; 


// get modules list 
global $modules_array; 
$modules_array = common::getModulesList(); 

require_once $config_abs_path."/add_hooks.php"; 

// get settings 
global $appearance_settings, $ads_settings, $settings, $seo_settings; 
$appearance_settings=settings::getAppearance(); 
$ads_settings=settings::getAdsSettings(); 
$settings=settings::getSettings(); 
$seo_settings = settings::getSeoSettings(); 

// current location 
if($settings['enable_locations']) { 
    require_once($config_abs_path.'/classes/locations.php'); 
    $lclass = new locations(); 
    $lclass->init(); 


// set default timezone 
if($appearance_settings['timezone'] && function_exists('date_default_timezone_set')) 
    date_default_timezone_set($appearance_settings['timezone']); 

// include language file 
require_once($lang); 

// do include actions 
do_action("include"); 

// ******** simulate scheduler ********** 
// run once a day, first time when the script is accessed 
// and the value of LAST_DAY in last.php is not today date. 
// 
if($settings['cron_simulator']) { 

require_once($config_abs_path.'/last.php'); 

$day=date('d'); 
if(LAST_DAY!=$day) 

    write_last($day); 
    require_once($config_abs_path.'/periodic.php'); 




?>
serva
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Oct 06, 2012 11:37 pm

Re: Really need help with Strict Standards

Postby us2rn4m2 » Mon Oct 08, 2012 8:14 am

Hi,

Your actual error reporting level is E_STRICT .
Change your error reporting level.

http://php.net/manual/en/function.error-reporting.php
http://www.php.net/manual/en/errorfunc.constants.php

or declare your method 'static'
us2rn4m2
New php-forum User
New php-forum User
 
Posts: 17
Joined: Thu Aug 09, 2012 1:28 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.