View Full Version : Problems after installing Care 2x

06-29-2010, 01:10 PM
The problem when I finish Installing care 2x and try to open main page it gives me this error:
Session: connection failed
Fatal error: Cannot access empty property in /home/a3407783/public_html/gui/smarty_template/smarty_care.class.php on line 75
and this file code:

* SETUP Smarty for CARE2X
* 19.12.2003 Thomas Wiedmann
* Converted to smarty_care.class.php by Elpidio Latorilla 2003-12-25
* For global smarty template class

* LOAD Smarty Library
require_once ($root_path.'classes/smarty/libs/Smarty.class.php');

class smarty_care extends Smarty {

var $bInitGUI = TRUE;
var $bShowCopyright = TRUE;
var $bLoadJS = TRUE;
var $templatedir;

#Set the default template, change this to the desired default template
var $default_template='default';

var $sDocRoot;

var $root_path;
var $LDCloseAlt;
var $cfg;
var $lang;
var $pgt;

* Constructor
* @param string modulname == cache directory /modules/$dirname
* @param boolean Initialize GUI (default TRUE)
* @param boolean Show copyright footer (default TRUE)
* @param boolean Load standard Javascript code (default TRUE)
function smarty_care ($dirname, $bInit = TRUE, $bShowCopy = TRUE, $bLoadJS = TRUE) {

global $root_path, $templatedir, $default_template, $sDocRoot, $LDCloseAlt, $cfg, $lang, $pgt, $GLOBAL_CONFIG;


$this->root_path = $root_path;

# Set the root path

# Path to the smarty care templates and classes
$this->sDocRoot = $root_path.'gui/smarty_template';

# Set the template
# First check if the user config template is available
# Else get try to get the global config template
if(!isset($GLOBAL_CONFIG)||!is_array($GLOBAL_CONFIG)) $GLOBAL_CONFIG=array();

# create global config object
$gc=& new GlobalConfig($GLOBAL_CONFIG);
# Get the global template config

# If the global config template is not available, use hard coded template theme
if(isset($template_theme)) $this->templatedir=$template_theme; // use this theme if the global item is not available
else $this->templatedir = $this->$default_template;

# Last check if the template directory does not exist, use default template (last resort)
//if(!file_exists("$this->sDocRoot/tempates/$this->templatedir/.")) $this->templatedir=$this->default_template;

# Set the flags
$this->bInitGUI = $bInit;
$this->bShowCopyright = $bShowCopy;
$this->bLoadJS = $bLoadJS;

$this->LDCloseAlt = $LDCloseAlt;
$this->cfg = $cfg;
$this->lang = $lang;
$this->pgt = $pgt;

# Another check if the working directory is really inside the template theme.
# If not, use default template theme.

$this->template_dir = $this->sDocRoot."/templates/$this->templatedir";
//$this->compile_dir = $this->sDocRoot."/templates_c/$this->templatedir/$dirname";
$this->compile_dir = $this->sDocRoot."/templates_c/$this->templatedir";
$this->template_dir = $this->sDocRoot."/templates/$this->default_template";
//$this->compile_dir = $this->sDocRoot."/templates_c/$this->default_template/$dirname";
$this->compile_dir = $this->sDocRoot."/templates_c/$this->default_template";

$this->config_dir = $this->sDocRoot.'/configs';
$this->cache_dir = $this->sDocRoot.'/cache';

# For temporary debugging
echo $this->template_dir."<p>";
echo $this->compile_dir."<p>";
echo $this->config_dir."<p>";
echo $this->cache_dir."<p>";
* global configs
$Logo = $this->root_path.'classes/Smarty-2.6.0/misc/smarty_icon.gif';

//$this->assign("SmartyLogo","<a href='http://smarty.php.net/'><img src='$Logo' border='00' height='31' width='88' /></a>");
$this->debug = true;
// $this->caching = true;

* Smarty delimiters
$this->left_delimiter = '{{';
$this->right_delimiter = '}}';

# Now assign standard GUI elements if bInitGUI flag is set to TRUE (default is TRUE)

} // end of constructor

function InitializeGUI(){
global $root_path, $lang, $cfg;

if(empty($root_path)) $root_path = $this->root_path;
if(empty($lang)) $lang = $this->lang;

# HEAD META definition


# collect JavaScript for Smarty. By default collect the help javascript and css stylesheets

$sTemp = ob_get_contents();


# Added for the html tag direction

# Set colors

# Set title bar buttons
$this->assign('gifBack2',createLDImgSrc($this->root_path,'back2.gif','0') );
$this->assign('gifHilfeR',createLDImgSrc($this->root_path,'hilfe-r.gif','0') );
$this->assign('gifClose2',createLDImgSrc($this->root_path,'close2.gif','0') );
$this->assign('LDCloseAlt',$this->LDCloseAlt );

# Set default href of the title bar buttons
# By default, the back button uses the javascript

# By default the help button points to the main help window

# By default the break/close button points to the main startframe

# By default the toolbar title is empty

# By default the window title is Care2x

# For the dhtml effects

if($this->cfg['dhtml']) {

# Overload css document body attributes

$this->assign('dhtml','style="filter:alpha(opacity=70)" onMouseover="hilite(this,1)" onMouseOut="hilite(this,0)"');
$this->assign('sLinkColors','link='.$this->cfg['idx_txtcolor'].' alink='.$this->cfg['body_alink'].' vlink='.$this->cfg['idx_txtcolor']);

# Show Copyright


function Copyright(){
global $root_path, $lang;

if(empty($root_path)) $root_path = $this->root_path;
if(empty($lang)) $lang = $this->lang;

if(file_exists($sTempFile)) include($sTempFile);
else include($this->root_path.'language/en/en_copyrite.php');
$sTemp = ob_get_contents();
return "<div class=\"copyright\">$sTemp</div>";

function PageTime(){
//global $pgt;
$sTemp = ob_get_contents();
return $sTemp;

} // end class


please help me
Thanks in advance

06-29-2010, 01:24 PM
That would be somewhat difficult to daignose as I have not used the software you are asking about. However, I believe the error refers to this line (75):

else $this->templatedir = $this->$default_template;

This is syntactically invalid, $default_template should not be prefixed by a dollar sign. It is possible that your server configuration is incompatible with the care2x software (ie: you may be running a too-recent version of PHP!).

A little information on the syntactic error can be found here: http://php.syntaxerrors.info/index.php?title=Cannot_access_empty_property

I would try and find the minimum system requirements for care2x, but their website is empty!

06-29-2010, 01:39 PM
Care2X is open source software designed to integrate different information systems in healthcare organizations into a single system.

download link:

you can try to download it and install it.I remember when installing it gives me something on php versions.
Thanks in advance

06-29-2010, 06:37 PM
Well I am quite aware what it is, but I am not going to download and install it. The issue you are experiencing is a syntax error - correct it or use a server configuration that is compatible with your software.

06-30-2010, 07:20 AM
I correct the error but still have another problem:
Session: connection failed
can you suggest to me what to do?

Thanks for your help

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum