Mysidia Adoptables Support Forum  

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

Notices

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: 516
Gender: Unknown/Other
Credits: 63,461
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: 205
Gender: Male
Credits: 26,048
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: 516
Gender: Unknown/Other
Credits: 63,461
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: 125
Gender: Female
Credits: 16,965
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: 516
Gender: Unknown/Other
Credits: 63,461
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: 516
Gender: Unknown/Other
Credits: 63,461
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
  #7  
Old 01-25-2018, 05:05 PM
AriaAmberkinz's Avatar
AriaAmberkinz AriaAmberkinz is offline
Member
 
Join Date: Jan 2018
Posts: 7
Gender: Female
Credits: 910
AriaAmberkinz is on a distinguished road
Default

Could you post a more detailed version of what you did, Dinocanid? I seem to be having the same issue.
Reply With Quote
  #8  
Old 01-25-2018, 07:52 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,461
Dinocanid is on a distinguished road
Default

Quote:
Originally Posted by AriaAmberkinz View Post
Could you post a more detailed version of what you did, Dinocanid? I seem to be having the same issue.
On a fresh install, there's this code under "public function initialize" in class_language.php:
PHP Code:
public function initialize(){
        
$globallangfile "{$this->dir}lang/lang_global.php";
        require 
$globallangfile;
        
$this->global = new ArrayObject($langArrayObject::ARRAY_AS_PROPS);
    } 
I changed it so I defined the path myself, like this:
PHP Code:
public function initialize(){
    
$this->root "/home/foodbabs/public_html/";
        
$globallangfile "{$this->root}lang/lang_global.php";
        require 
$globallangfile;
        
$this->global = new ArrayObject($langArrayObject::ARRAY_AS_PROPS);
    } 
In class_mysidia.php, I replaced "public function getTemplate()" with this:
PHP Code:
public function getTemplate(){
    
$this->root "/home/foodbabs/public_html/";
        
$templateClass "{$this->root}inc/smarty/Smarty.class.php";
        require 
$templateClass;
        
        
$this->template = new Template($this->path);
        
Registry::set(new String("template"), $this->templateTRUETRUE);
        return 
$this->template;
    } 
So I added my own path based on the home directory, that way it doesn't forget where things are for some reason.
__________________
Reply With Quote
  #9  
Old 01-25-2018, 10:38 PM
AriaAmberkinz's Avatar
AriaAmberkinz AriaAmberkinz is offline
Member
 
Join Date: Jan 2018
Posts: 7
Gender: Female
Credits: 910
AriaAmberkinz is on a distinguished road
Default

Thanks! That seems to have fixed that particular problem. Unfortunately, now I'm getting
Quote:
Fatal error: Class Language contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Initializable::initialize) in /home/noppitsp/public_html/Mysidia Adoptables v1.3.4/classes/class_language.php on line 132
I checked class_language.php and there's just a bracket on that line.
Reply With Quote
  #10  
Old 01-26-2018, 08:35 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,461
Dinocanid is on a distinguished road
Default

Maybe try moving it out of a subfolder and into the root/public_html folder? (The whole script, not just that file)
I've never installed mysidia in a subfolder, so idk if that could be related or not.
__________________
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 11:17 PM.

Currently Active Users: 273 (0 members and 273 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


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