Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Problems after installing Care 2x

    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:
    PHP Code:

    <?php
    /**
    * SETUP Smarty for CARE2X
    *
    * SMARTY.PHP
    * 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->smarty();

            
    $this->root_path $root_path;

            
    # Set the root path
            
    $this->assign('root_path',$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
            
    if(isset($cfg['template_smarty'])&&!empty($cfg['template_smarty'])){
                
    $this->templatedir=$cfg['template_smarty'];
            }else{
                
    # Else get try to get the global config template
                
    if(!isset($GLOBAL_CONFIG)||!is_array($GLOBAL_CONFIG)) $GLOBAL_CONFIG=array();

                
    # create global config object
                
    if(!isset($GLOBAL_CONFIG['template_smarty'])){
                    include_once(
    $root_path.'include/care_api_classes/class_globalconfig.php');
                    
    $gc=& new GlobalConfig($GLOBAL_CONFIG);
                    
    # Get the global template config
                    
    $gc->getConfig('template_smarty');
                }

                
    # If the global config template is not available, use hard coded template theme
                
    if(!isset($GLOBAL_CONFIG['template_smarty'])||empty($GLOBAL_CONFIG['template_smarty'])){
                    if(isset(
    $template_theme)) $this->templatedir=$template_theme// use this theme if the global item is not available
                        
    else $this->templatedir $this->$default_template;
                }else{
                    
    $this->templatedir=$GLOBAL_CONFIG['template_smarty'];
                }
            }

            
    # 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.

            
    if(file_exists($this->sDocRoot."/templates/$this->templatedir/$dirname/.")){
                
    $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";
            }else{
                
    $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
             
    if(0){
                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)

            
    if($this->bInitGUI){
                
    $this->InitializeGUI();
            }
        } 
    // 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

            
    $this->assign('setCharSet',setCharSet());

            
    # collect JavaScript for Smarty. By default collect the help javascript and css stylesheets
            
            
    if($this->bLoadJS){
                
    ob_start();
                    include(
    $this->root_path.'include/inc_js_gethelp.php');
                    include(
    $this->root_path.'include/inc_css_a_hilitebu.php');
                    
    $sTemp ob_get_contents();
                
    ob_end_clean();
            }

            
    $this->assign('JavaScript',$sTemp);

            
    # Added for the html tag direction
            
    $this->assign('HTMLtag',html_ret_rtl($this->lang));

            
    # Set colors
            
    $this->assign('top_txtcolor',$this->cfg['top_txtcolor']);
            
    $this->assign('top_bgcolor',$this->cfg['top_bgcolor']);
            
    $this->assign('body_bgcolor',$this->cfg['body_bgcolor']);
            
    $this->assign('body_txtcolor',$this->cfg['body_txtcolor']);
            
    $this->assign('bot_bgcolor',$this->cfg['bot_bgcolor']);

            
    # 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
            
    $this->assign('pbBack','javascript:window.history.back()');

            
    # By default the help button points to the main help window
            
    $this->assign('pbHelp',"javascript:gethelp()");

            
    # By default the break/close button points to the main startframe
            
    $this->assign('breakfile',$this->root_path.'main/startframe.php'.URL_APPEND);

            
            
    # By default the toolbar title is empty
            //$this->assign('sToolbarTitle','');

            # By default the window title is Care2x
             
    $this->assign('title','Care2x');

            
    # For the dhtml effects

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

                
    # Overload css  document body attributes
                
                
    $this->assign('bgcolor','bgcolor='.$this->cfg['body_bgcolor']);
                
    $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
            
            
    if($this->bShowCopyright){
                
    $this->assign('sCopyright',$this->Copyright());
                
    $this->assign('sPageTime',$this->Pagetime());
            }
        }

        function 
    Copyright(){
            global 
    $root_path$lang;

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

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

        function 
    PageTime(){
            
    //global $pgt;
            
    ob_start();
                if(
    defined('USE_PAGE_GEN_TIME')&&USE_PAGE_GEN_TIME){
                    
    $this->pgt->ende();
                    
    $this->pgt->ausgabe();
                }
                
    $sTemp ob_get_contents();
            
    ob_end_clean();
            return 
    $sTemp;
        }

    // end class

    ?>
    please help me
    Thanks in advance

  • #2
    Regular Coder xconspirisist's Avatar
    Join Date
    Jun 2006
    Location
    Great Britain.
    Posts
    138
    Thanks
    1
    Thanked 6 Times in 6 Posts
    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):

    PHP Code:
    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.p...empty_property

    I would try and find the minimum system requirements for care2x, but their website is empty!
    If I have been helpful, use the "thank" button - It makes me happy!

    xconspirisist.co.uk - homepage of my online alias
    technowax.net - a community for people interested in all forms of modern technology.

  • #3
    New Coder
    Join Date
    Sep 2009
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Care2X is open source software designed to integrate different information systems in healthcare organizations into a single system.

    download link:
    http://sourceforge.net/projects/care2002/

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

  • #4
    Regular Coder xconspirisist's Avatar
    Join Date
    Jun 2006
    Location
    Great Britain.
    Posts
    138
    Thanks
    1
    Thanked 6 Times in 6 Posts
    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.
    If I have been helpful, use the "thank" button - It makes me happy!

    xconspirisist.co.uk - homepage of my online alias
    technowax.net - a community for people interested in all forms of modern technology.

  • #5
    New Coder
    Join Date
    Sep 2009
    Posts
    40
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I correct the error but still have another problem:
    Session: connection failed
    can you suggest to me what to do?

    Thanks for your help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •