Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2017, 10:08 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 384
Gender: Unknown/Other
Credits: 14,091
Dinocanid is on a distinguished road
Default Fatal errors in ACP

I have a strange problem where I'll get the following errors, but only in the ACP and nowhere else:
Quote:
Warning: require(inc/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/foodbabs/public_html/classes/class_mysidia.php on line 326

Warning: require(inc/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/foodbabs/public_html/classes/class_mysidia.php on line 326

Fatal error: require(): Failed opening required 'inc/smarty/Smarty.class.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/foodbabs/public_html/classes/class_mysidia.php on line 326
I'm using x10 and I already applied the class_path fix, so that's not the issue. It used to work fine before, and I haven't made any changes to it, so I'm unsure where the problem is. It used to work just fine too.
__________________
Reply With Quote
  #2  
Old 09-25-2017, 11:16 AM
Silver_Brick Silver_Brick is offline
Designer || Coder
 
Join Date: Oct 2016
Location: In Earth
Posts: 201
Gender: Male
Credits: 6,381
Silver_Brick is on a distinguished road
Default

as much as i know it is problem related to template of admin panel if you don't mind can i have a look at your files that you changed
__________________
Reply With Quote
  #3  
Old 09-25-2017, 07:42 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 384
Gender: Unknown/Other
Credits: 14,091
Dinocanid is on a distinguished road
Default

It's not the ACP template file, since I replaced it with a fresh, unedited one to see if that was the problem. It didn't fix a thing :/
PHP Code:
<?php

/**
 * The Path Class, it is one of Mysidia system core classes.
 * It acts as an initializer and wrapper for Mysidia-specific paths.
 * It implements PHP basic path functions, and adds enhanced features upon them.
 * An instance of Path class is generated upon Mysidia system object's creation. 
 * This specific instance is available from Registry, just like any other Mysidia core objects. 
 * @category Resource
 * @package Core
 * @author Hall of Famer 
 * @copyright Mysidia Adoptables Script
 * @link http://www.mysidiaadoptables.com
 * @since 1.3.2
 * @todo Improvement over include_path methods to enable better auto-loading.
 */

class Path extends Core implements Initializable{

    
/**
     * The absolute property, which stores the absolute path of the main site. 
     * @access private
     * @var String
    */
    
private $absolute;

    
/**
     * The root property, which defines the current file root directory.
     * @access private
     * @var String
    */
    
private $root;

    
/**
     * The tempRoot property, which defines the root directory used in template files.
     * @access private
     * @var String
    */
    
private $tempRoot;

    
/**
     * The dir property, which stores the current file sub directory.     
     * @access private
     * @var String
    */
    
private $dir;

    
/**
     * The path property, it specifies important file paths to be included.
     * @access private
     * @var ArrayObject
    */    
    
private $path;

    
/**
     * Constructor of Path Class, it initializes basic path properties.    
     * @access public
     * @return Void
     */    
    
public function __construct(){
        
$this->absolute "http://".DOMAIN.SCRIPTPATH."/";
        
$this->root "/home/foodbabs/public_html/";   
        
$this->tempRoot SCRIPTPATH."/";
        
$this->path = new ArrayObject(array("{$this->root}classes/core""{$this->root}classes/exception""{$this->root}classes/user""{$this->root}classes/message""{$this->root}classes/item""{$this->root}classes/shop"));    
        
// MVC structure has yet been established, for now comment out the include path setup.
        //$this->initialize();        
    
}

    
/**
     * The initialize method, which handles basic include path operations.  
     * @access public
     * @return Void
     */        
    
public function initialize(){
        if(empty(
$this->dir) or empty($this->path)) throw new Exception('Cannot set basic include paths.');
        foreach(
$this->path as $path){
            
$this->setIncludePath($path);  
        }
    }

    
/**
     * The getAbsolute method, which retrieves private property absolute.  
     * @access public
     * @return String
     */    
    
public function getAbsolute(){
        return 
$this->absolute;
    
    }
    
    
/**
     * The getRoot method, which retrieves private property root.  
     * @access public
     * @return String
     */    
    
public function getRoot(){
        return 
$this->root;
    
    }

    
/**
     * The getScriptRoot method, which retrieves private property scriptRoot.  
     * This can be used for css stylesheet and javascript loading in header template file.
     * @access public
     * @return String
     */    
    
public function getTempRoot(){
        return 
$this->tempRoot;
    
    }

 
    
/**
     * The getDirectory method, which obtains the current directory.
     * By default this value is null, it must be assigned first in front controller. 
     * @access public
     * @return String
     */    
    
public function getDirectory(){
        return 
$this->dir;
    }

    
/**
     * The setDirectory method, set the private property dir.
     * @access public
     * @return Void
     */
    
public function setDirectory($dir){
        
$this->dir $dir;
    }

    
/**
     * The includes method, simulates the include and include_once function in OO way.
     * @access public
     * @return Void
     */        
    
public function includes($file$mode NULL){
        if(
$mode "once") include_once $file;
        else include 
$file;
    }

    
/**
     * The requires method, simulates the require and require_once function in OO way.
     * @access public
     * @return Void
     */            
    
public function requires($file){
        if(
$mode "once") require_once $file;
        else require 
$file;
    }

    
/**
     * The getIncludePath method, similar to get_include_path() function in PHP.
     * Its functionality will expand in future releases.
     * @access public
     * @return String
     */            
    
public function getIncludePath(){
        return 
get_include_path();
    }

    
/**
     * The setIncludePath method, similar to set_include_path() function in PHP.
     * This method significantly simplifies multiple include path operations.
     * @access public
     * @return Void
     */        
    
public function setIncludePath($path){
        
set_include_path($this->getIncludePath().PATH_SEPARATOR.$path); 
    }

    
/**
     * The restoreIncludePath method, similar to restore_include_path() function in PHP.
     * Its functionality will expand in future releases.
     * @access public
     * @return Void
     */        
    
public function restoreIncludePath(){
        
restore_include_path();
    }    
}
?>
This is my class_path, in case i missed something.
__________________

Last edited by Dinocanid; 09-25-2017 at 07:46 PM.
Reply With Quote
  #4  
Old 09-25-2017, 08:07 PM
Kesstryl's Avatar
Kesstryl Kesstryl is offline
Member
 
Join Date: Feb 2012
Posts: 119
Gender: Female
Credits: 4,727
Kesstryl is on a distinguished road
Default

Did you recently upgrade your Wamp server or whatever development server you are using? Unless it's the one hosted here, maybe something was updated on the Mysidia server and it's breaking the code. Any upgrades in php or database server can cause issues like this. I recently installed Wamp on a new laptop, and the newest version of mysql that it uses now defaults to strict mode which broke some of my code.
Reply With Quote
  #5  
Old 09-25-2017, 08:35 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 384
Gender: Unknown/Other
Credits: 14,091
Dinocanid is on a distinguished road
Default

It's not on WAMPP (or XAMPP, since I have both), I have it on x10 host. I haven't upgraded anything, unless x10 does automatic upgrades for all servers.
__________________
Reply With Quote
  #6  
Old 10-14-2017, 03:17 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 384
Gender: Unknown/Other
Credits: 14,091
Dinocanid is on a distinguished road
Default

It took my a while to fix this, but i managed to figure it out. I had to go into class_mysidia and class_language and add "$this-root", since the x10 path fix had messed up some relative pathing.
I needed to do this in class_language for example:
PHP Code:
$this->root "/home/foodbabs/public_html/";
        
$globallangfile "{$this->root}lang/lang_global.php"
__________________
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:00 PM.

Currently Active Users: 136 (1 members and 135 guests)
Threads: 3,895, Posts: 31,005, Members: 15,448
Welcome to our newest members, laurenannedaniel.
BER





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636