Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   'class_initializer.php' issues! (http://www.mysidiaadoptables.com/forum/showthread.php?t=4782)

zoe 02-05-2015 06:46 PM

'class_initializer.php' issues!
 
Hello everyone!!
I've installed MAMP and set up the latest Mysidia script. When I launch localhost though I get this error:

PHP Code:

Warning: require(inc/config.php): failed to open streamNo such file or directory in /Applications/MAMP/htdocs/classes/class_initializer.php on line 97

Fatal error
: require(): Failed opening required 'inc/config.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.2/lib/php'in /Applications/MAMP/htdocs/classes/class_initializer.php on line 97 

These are lines 95 through 97 of my class_initializer.php file:

PHP Code:

  private function initialize(){
        
$config "{$this->dir}inc/config.php";
        require 
$config

I think it has to do with the MAMP setup, since ive heard its a lot like WAMP and when you install WAMP you have to mess around with your config.php file a bit. I haven't found any helpful MAMP tutorials though, so I can't be sure.

Kyttias 02-05-2015 11:08 PM

Confirm you've renamed the config file in the inc folder during installation. It's not named config, you have to rename inc/config_adopts.php to inc/config.php - no matter whether you're installing locally or on a hosted server.

http://fc01.deviantart.net/fs71/f/20...as-d8fpept.gif

If you get more errors after this step, let me know. Keep referring to my WAMP tutorial, even though you're using MAMP! You may run across a lot of the same errors that need to be fixed in all the same ways - but navigating to where the files you need to edit in MAMP may be different. That's all! ^^;

zoe 02-06-2015 07:03 PM

I've installed MAMP just like your tutorial, but Im still getting a load of notices and a fatal error when i enter 127.0.0.1.

PHP Code:

NoticeUndefined variablecontroller in /Applications/MAMP/htdocs/classes/class_language.php on line 111
Notice
Undefined propertyFormRenderer::$thematicBreak in /Applications/MAMP/htdocs/classes/class_guirenderer.php on line 184
Notice
Undefined propertyDocumentRenderer::$thematicBreak in /Applications/MAMP/htdocs/classes/class_guirenderer.php on line 184
Notice
Undefined propertyListRenderer::$thematicBreak in /Applications/MAMP/htdocs/classes/class_guirenderer.php on line 184
Fatal error
Uncaught exception 'SmartyException' with message 'Unable to load template file 'template.tpl'' in /Applications/MAMP/htdocs/inc/smarty/sysplugins/smarty_internal_templatebase.php:127 Stack trace#0 /Applications/MAMP/htdocs/inc/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('template.tpl', NULL, NULL, NULL, true) #1 /Applications/MAMP/htdocs/classes/class_template.php(135): Smarty_Internal_TemplateBase->display('template.tpl') #2 /Applications/MAMP/htdocs/classes/class_view.php(280): Template->output() #3 /Applications/MAMP/htdocs/classes/class_frontcontroller.php(102): View->render() #4 /Applications/MAMP/htdocs/index.php(74): FrontController->render() #5 /Applications/MAMP/htdocs/index.php(78): IndexController::main() #6 {main} thrown in /Applications/MAMP/htdocs/inc/smarty/sysplugins/smarty_internal_templatebase.php on line 127 

Most of these notices were repeated a lot. Ive changed the php.ini file, by the way!

Kyttias 02-06-2015 08:20 PM

If error reporting has been turned off in php.ini, the "notices" should not be occurring. Temporarily shut off MAMP, or restart your computer if you don't know how, and turn it back on. Major changes won't go through until the server has been restarted.

As for that particular fatal error, I've only seen that happen when the default theme is changed incorrectly. Did you change the default theme name during installation?

Other people with this error: [ x ], [ x ], [ x ], [ x ]

There is also an off chance your config.php is not filled with the correct information, or that the correct information was not entered during installation.

zoe 02-06-2015 09:28 PM

I messed a bit the the php.ini file a bit more and managed to fix it, I think. Now when I enter 127.0.0.1 everything is blank, like in x10hosting.

I tried fixing the class_path.php file, by changing the "/home/yoursitename/public_html/" to "/Applications/MAMP/htdocs/" (where the Mysidia files are stored). Nothing happened.

As for the themes, I haven't even touched the templates folder...

Kyttias 02-06-2015 09:58 PM

Don't change the class_path.php file.

As for the themes, please show me what your default theme for the entire site is by looking in your database under 'adopts_settings', that is, if you didn't change the adopts_ prefix to something else. I'd like to rule this out as a possibility, in case you changed 'main' to something else during installation.

Also, please post your config.php file contents so I can check for errors in the script path (hint: it should be completely empty unless your site is inside a folder inside it's directory). It should look like this (aside from the entries with '------' as those should be filled with relevant data):
define('DBHOST', 'localhost'); //DB Hostname
define('DBUSER', '------'); //DB Username
define('DBPASS', '------'); //DB Password
define('DBNAME', '------'); //Your database name
define('DOMAIN', '127.0.0.1'); //Your domain name (No http, www or . )
define('SCRIPTPATH', ''); //The folder you installed this script in
define('PREFIX', 'adopts_');

zoe 02-07-2015 08:49 AM

Okay. I fixed the config.php file back to its original.

By adopts_settings I suppose you mean in the phpMyAdmin. The only line on that file is

PHP Code:

SELECT FROM `adopts_settings

Which is kinda weird since everyone else seems to have a lot of things in there... Sorry, I'm really new to this!!

This is my config.php file:


PHP Code:

define('DBHOST''localhost');             //DB Hostname
define('DBUSER''--------------');             //DB Username
define('DBPASS''--------------');             //DB Password
define('DBNAME''--------------');             //Your database name
define('DOMAIN''127.0.0.1');             //Your domain name (No http, www or . )
define('SCRIPTPATH''');     //The folder you installed this script in
define('PREFIX''adopts_');
?> 


Kyttias 02-07-2015 04:56 PM

Mine looks like this:

http://fc02.deviantart.net/fs70/f/20...as-d8h2l4u.png
*my theme is Bootstrap, but by default it should be main

If this table in the database is really empty, then the site never even finished installing. Visit http://127.0.0.1/install again, even if you had before, and reinstall the entire thing. You might need to drop the database first, but likely not.

zoe 02-07-2015 06:09 PM

I've fixed it, thank you! I had 0 rows in my adopts_settings file. Now I have 21 rows.

But whenever I try to log in or click any link in the index page, I get another error. If I were to click on 'login', Ill get redirected to http://127.0.0.1/login, and Ill get a 404 Not Found error.

It reads: "The requested URL /login was not found on this server."

Kyttias 02-07-2015 09:59 PM

Is mod_rewrite enabled in Apache? [ Possible help. ]


All times are GMT -5. The time now is 08:29 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.