[solved] Setup with CMS 1.6.6 - any help would be most appreciated
Posted: Wed Oct 28, 2009 10:19 pm
Hello
I am new to CMSMS and need some help to remove some errors from pages.
When looking at any page when connecting to the local host, I receive Deprecated errors refering to lines in different setup files. Shown below is an example of what is displayed which is shown at the top of the web page:
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 73
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 157
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 235
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 62
Deprecated: Function eregi_replace() is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 247
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 184
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 196
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 208
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 221
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 234
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 246
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 258
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 270
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 282
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 294
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 316
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.moduleloader.inc.php on line 69
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.moduleloader.inc.php on line 129
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.module.inc.php on line 311
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.module.inc.php on line 530
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 73
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 559
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 288
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 299
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 315
Deprecated: Function split() is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 972
Deprecated: Function ereg_replace() is deprecated in C:\wamp2\www\cmsmadesimple\plugins\function.stylesheet.php on line 104
The include file is shown as follows which may be of some help when tracing the errors on the page:
variables['starttime'] = $starttime;
}
#Load the config file (or defaults if it doesn't exist)
require(cms_join_path($dirname,'version.php'));
require(cms_join_path($dirname,'lib','config.functions.php'));
#Grab the current configuration
$config =& $gCms->GetConfig();
#Attempt to override the php memory limit
if( isset($config['php_memory_limit']) && !empty($config['php_memory_limit']) )
{
ini_set('memory_limit',trim($config['php_memory_limit']));
}
#Hack for changed directory and no way to upgrade config.php
$config['previews_path'] = str_replace('smarty/cms', 'tmp', $config['previews_path']);
#Add users if they exist in the session
$gCms->variables['user_id'] = '';
if (isset($_SESSION['cms_admin_user_id']))
{
$gCms->variables['user_id'] = $_SESSION['cms_admin_user_id'];
}
$gCms->variables['username'] = '';
if (isset($_SESSION['cms_admin_username']))
{
$gCms->variables['username'] = $_SESSION['cms_admin_username'];
}
if ($config["debug"] == true)
{
@ini_set('display_errors',1);
@error_reporting(E_ALL);
}
debug_buffer('loading smarty');
require(cms_join_path($dirname,'lib','smarty','Smarty.class.php'));
debug_buffer('loading adodb');
require(cms_join_path($dirname,'lib','adodb.functions.php'));
load_adodb();
debug_buffer('loading page functions');
require_once(cms_join_path($dirname,'lib','page.functions.php'));
debug_buffer('loading content functions');
require_once(cms_join_path($dirname,'lib','content.functions.php'));
debug_buffer('loading pageinfo functions');
require_once(cms_join_path($dirname,'lib','classes','class.pageinfo.inc.php'));
if (! isset($CMS_INSTALL_PAGE))
{
debug_buffer('loading translation functions');
require_once(cms_join_path($dirname,'lib','translation.functions.php'));
}
debug_buffer('loading events functions');
require_once(cms_join_path($dirname,'lib','classes','class.events.inc.php'));
debug_buffer('loading php4 entity decode functions');
require_once($dirname.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'html_entity_decode_php4.php');
debug_buffer('done loading files');
#Load them into the usual variables. This'll go away a little later on.
global $DONT_LOAD_DB;
if (!isset($DONT_LOAD_DB))
{
$cmsdb =& $gCms->GetDB();
// $cmsdb->Execute('set names utf8'); // database connection with utf-8
}
$smarty =& $gCms->GetSmarty();
$contenttypes =& $gCms->contenttypes;
#Load content types
$dir = cms_join_path($dirname,'lib','classes','contenttypes');
$handle=opendir($dir);
while ($file = readdir ($handle))
{
$path_parts = pathinfo($file);
if (isset($path_parts['extension']) && $path_parts['extension'] == 'php')
{
$obj =& new CmsContentTypePlaceholder();
$obj->type = strtolower(basename($file, '.inc.php'));
$obj->filename = cms_join_path($dir,$file);
$obj->loaded = false;
$obj->friendlyname = basename($file, '.inc.php');
$contenttypes[strtolower(basename($file, '.inc.php'))] =& $obj;
}
}
closedir($handle);
if (!defined('SMARTY_DIR')) {
define('SMARTY_DIR', cms_join_path($dirname,'lib','smarty') . DIRECTORY_SEPARATOR);
}
#Stupid magic quotes...
if(get_magic_quotes_gpc())
{
stripslashes_deep($_GET);
stripslashes_deep($_POST);
stripslashes_deep($_REQUEST);
stripslashes_deep($_COOKIE);
stripslashes_deep($_SESSION);
}
#Fix for IIS (and others) to make sure REQUEST_URI is filled in
if (!isset($_SERVER['REQUEST_URI']))
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if(isset($_SERVER['QUERY_STRING']))
{
$_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
}
}
#Setup the object sent to modules
$gCms->variables['pluginnum'] = 1;
if (isset($page))
{
$gCms->variables['page'] = $page;
}
#Set a umask
$global_umask = get_site_preference('global_umask','');
if( $global_umask != '' )
{
@umask( octdec($global_umask) );
}
#Set the locale if it's set
#either in the config, or as a site preference.
$frontendlang = get_site_preference('frontendlang','');
if (isset($config['locale']) && $config['locale'] != '')
{
$frontendlang = $config['locale'];
}
if ($frontendlang != '')
{
@setlocale(LC_ALL, $frontendlang);
}
$smarty->assign('sitename', get_site_preference('sitename', 'CMSMS Site'));
$smarty->assign('lang',$frontendlang);
$smarty->assign('encoding',get_encoding());
$smarty->assign_by_ref('gCms',$gCms);
if ($config['debug'] == true)
{
$smarty->debugging = true;
$smarty->error_reporting = 'E_ALL';
}
if (isset($CMS_ADMIN_PAGE) || isset($CMS_STYLESHEET))
{
include_once(cms_join_path($dirname,$config['admin_dir'],'lang.php'));
#This will only matter on upgrades now. All new stuff (0.13 on) will be UTF-8.
if (is_file(cms_join_path($dirname,'lib','convert','ConvertCharset.class.php')))
{
include(cms_join_path($dirname,'lib','convert','ConvertCharset.class.php'));
$gCms->variables['convertclass'] =& new ConvertCharset();
}
}
#Load all installed module code
$modload =& $gCms->GetModuleLoader();
$modload->LoadModules(isset($LOAD_ALL_MODULES), !isset($CMS_ADMIN_PAGE));
debug_buffer('', 'End of include');
function sanitize_get_var(&$value, $key)
{
$value = eregi_replace('\]*\>', '', $value);
}
# vim:ts=4 sw=4 noet
?>
I am new to CMSMS and need some help to remove some errors from pages.
When looking at any page when connecting to the local host, I receive Deprecated errors refering to lines in different setup files. Shown below is an example of what is displayed which is shown at the top of the web page:
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 73
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 157
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 235
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 62
Deprecated: Function eregi_replace() is deprecated in C:\wamp2\www\cmsmadesimple\include.php on line 247
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 184
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 196
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 208
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 221
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 234
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 246
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 258
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 270
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 282
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 294
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.global.inc.php on line 316
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.moduleloader.inc.php on line 69
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.moduleloader.inc.php on line 129
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.module.inc.php on line 311
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.module.inc.php on line 530
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 73
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 559
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 288
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 299
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp2\www\cmsmadesimple\lib\Tree\Tree.php on line 315
Deprecated: Function split() is deprecated in C:\wamp2\www\cmsmadesimple\lib\classes\class.contentoperations.inc.php on line 972
Deprecated: Function ereg_replace() is deprecated in C:\wamp2\www\cmsmadesimple\plugins\function.stylesheet.php on line 104
The include file is shown as follows which may be of some help when tracing the errors on the page:
variables['starttime'] = $starttime;
}
#Load the config file (or defaults if it doesn't exist)
require(cms_join_path($dirname,'version.php'));
require(cms_join_path($dirname,'lib','config.functions.php'));
#Grab the current configuration
$config =& $gCms->GetConfig();
#Attempt to override the php memory limit
if( isset($config['php_memory_limit']) && !empty($config['php_memory_limit']) )
{
ini_set('memory_limit',trim($config['php_memory_limit']));
}
#Hack for changed directory and no way to upgrade config.php
$config['previews_path'] = str_replace('smarty/cms', 'tmp', $config['previews_path']);
#Add users if they exist in the session
$gCms->variables['user_id'] = '';
if (isset($_SESSION['cms_admin_user_id']))
{
$gCms->variables['user_id'] = $_SESSION['cms_admin_user_id'];
}
$gCms->variables['username'] = '';
if (isset($_SESSION['cms_admin_username']))
{
$gCms->variables['username'] = $_SESSION['cms_admin_username'];
}
if ($config["debug"] == true)
{
@ini_set('display_errors',1);
@error_reporting(E_ALL);
}
debug_buffer('loading smarty');
require(cms_join_path($dirname,'lib','smarty','Smarty.class.php'));
debug_buffer('loading adodb');
require(cms_join_path($dirname,'lib','adodb.functions.php'));
load_adodb();
debug_buffer('loading page functions');
require_once(cms_join_path($dirname,'lib','page.functions.php'));
debug_buffer('loading content functions');
require_once(cms_join_path($dirname,'lib','content.functions.php'));
debug_buffer('loading pageinfo functions');
require_once(cms_join_path($dirname,'lib','classes','class.pageinfo.inc.php'));
if (! isset($CMS_INSTALL_PAGE))
{
debug_buffer('loading translation functions');
require_once(cms_join_path($dirname,'lib','translation.functions.php'));
}
debug_buffer('loading events functions');
require_once(cms_join_path($dirname,'lib','classes','class.events.inc.php'));
debug_buffer('loading php4 entity decode functions');
require_once($dirname.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'html_entity_decode_php4.php');
debug_buffer('done loading files');
#Load them into the usual variables. This'll go away a little later on.
global $DONT_LOAD_DB;
if (!isset($DONT_LOAD_DB))
{
$cmsdb =& $gCms->GetDB();
// $cmsdb->Execute('set names utf8'); // database connection with utf-8
}
$smarty =& $gCms->GetSmarty();
$contenttypes =& $gCms->contenttypes;
#Load content types
$dir = cms_join_path($dirname,'lib','classes','contenttypes');
$handle=opendir($dir);
while ($file = readdir ($handle))
{
$path_parts = pathinfo($file);
if (isset($path_parts['extension']) && $path_parts['extension'] == 'php')
{
$obj =& new CmsContentTypePlaceholder();
$obj->type = strtolower(basename($file, '.inc.php'));
$obj->filename = cms_join_path($dir,$file);
$obj->loaded = false;
$obj->friendlyname = basename($file, '.inc.php');
$contenttypes[strtolower(basename($file, '.inc.php'))] =& $obj;
}
}
closedir($handle);
if (!defined('SMARTY_DIR')) {
define('SMARTY_DIR', cms_join_path($dirname,'lib','smarty') . DIRECTORY_SEPARATOR);
}
#Stupid magic quotes...
if(get_magic_quotes_gpc())
{
stripslashes_deep($_GET);
stripslashes_deep($_POST);
stripslashes_deep($_REQUEST);
stripslashes_deep($_COOKIE);
stripslashes_deep($_SESSION);
}
#Fix for IIS (and others) to make sure REQUEST_URI is filled in
if (!isset($_SERVER['REQUEST_URI']))
{
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
if(isset($_SERVER['QUERY_STRING']))
{
$_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
}
}
#Setup the object sent to modules
$gCms->variables['pluginnum'] = 1;
if (isset($page))
{
$gCms->variables['page'] = $page;
}
#Set a umask
$global_umask = get_site_preference('global_umask','');
if( $global_umask != '' )
{
@umask( octdec($global_umask) );
}
#Set the locale if it's set
#either in the config, or as a site preference.
$frontendlang = get_site_preference('frontendlang','');
if (isset($config['locale']) && $config['locale'] != '')
{
$frontendlang = $config['locale'];
}
if ($frontendlang != '')
{
@setlocale(LC_ALL, $frontendlang);
}
$smarty->assign('sitename', get_site_preference('sitename', 'CMSMS Site'));
$smarty->assign('lang',$frontendlang);
$smarty->assign('encoding',get_encoding());
$smarty->assign_by_ref('gCms',$gCms);
if ($config['debug'] == true)
{
$smarty->debugging = true;
$smarty->error_reporting = 'E_ALL';
}
if (isset($CMS_ADMIN_PAGE) || isset($CMS_STYLESHEET))
{
include_once(cms_join_path($dirname,$config['admin_dir'],'lang.php'));
#This will only matter on upgrades now. All new stuff (0.13 on) will be UTF-8.
if (is_file(cms_join_path($dirname,'lib','convert','ConvertCharset.class.php')))
{
include(cms_join_path($dirname,'lib','convert','ConvertCharset.class.php'));
$gCms->variables['convertclass'] =& new ConvertCharset();
}
}
#Load all installed module code
$modload =& $gCms->GetModuleLoader();
$modload->LoadModules(isset($LOAD_ALL_MODULES), !isset($CMS_ADMIN_PAGE));
debug_buffer('', 'End of include');
function sanitize_get_var(&$value, $key)
{
$value = eregi_replace('\]*\>', '', $value);
}
# vim:ts=4 sw=4 noet
?>