-
Problem with install - cannot instantiate class - autoload_func.php
I've been trying to install zencart without success.
I've already uploaded all the files twice (different ftp clients), have created the configure.php files, modified access to files and folders (chmod), and always get a 500 server error page when hiting the install page.
Checking the error.log in the store (catalog) directory, the following error shows up:
PHP Fatal error: Cannot instantiate non-existent class: notifier in /home/mydomain/public_html/store/includes/autoload_func.php on line 79
Does anyone know how to sort this problem?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
A neat thing this forum does is to put similar threads at the bottom of a new thread. After you post a new thread, it will see if anything similar has been discussed.
One of those at the bottom of this thread should be helpful as these things are almost always a bad upload or incorrect configure file.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Hey dbltoe, thanks for pointing that topic.
I searched for this problem here and couldn't find any useful topic before opening this thread.
Just for the sake of it, I uploaded everything again (third time), and double checked once again if files were corrupted, had the wrong access rights, etc.
Everything was fine, but still, it didn't work.
When creating the configure.php files, I also tried two different things:
1. Used the configure.php files exactly as in the dist-configure.php (no edits to those files)
2. Modified those files with the correct settings (domain, paths, url, database, etc...)
With option 1, I still get the same entry in the error_log file:
Cannot instantiate non-existent class: notifier
With option 2, I get no entries in the error_log, but still the same 500 error page is displayed.
With both options, I also tried the following code in the application_top.php file:
Code:
define('DEBUG_AUTOLOAD', true);
The same page was returned with no further error/debug messages.
Does anyone know what may be the problem? Or how I can get more insights about it?
I wonder if this problem is related to the settings in the server.
As I use a hosting company, I will not be able to change those setting myself (but can always request them if I know what is required).
Does anyone know if the server settings may be causing this problem?
Btw, where can I find the required setting (or settings known to cause problems to zencart)? (I believe there must be something already here in the forums, but I just searched for it and couldn't find).
Any help is very much appreciated.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Sorry,
read over the 500 error in your first post.
Have you looked at the log files on your host to see what error it is throwing?
Have you tried renaming the .htaccess file?
The 500 error tells us the problem in that the host server doesn't like something.
A link to the offending site is always a good way for us to "see" what's going on.
-
Re: Problem with install - cannot instantiate class notifier - autoload_func.php
Can you please post a link to where this can be seen in action?
What are your server's PHP settings for include_path ?
(You can see this and other information by pointing your browser to www.your_site.com/zc_install/techsupp.php )
-
Re: Problem with install - cannot instantiate class - autoload_func.php
dbltoe and DrByte, thanks for your help and attention.
After not being able to understand the problem and install the latest version myself, I gave fantastico a try, and it installed okay. It simply works now.
I seriously have no idea what went wrong. I usually prefer to install all the scripts myself (not through fantastico), so I have more control over the install process, but was not able to crack down this problem.
So, now that things are finally working, I hope to become an active member here (i.e., addicted to zen-cart)... :wink:
Thanks again.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
You should upload the zc_install folder to your site and see if it will run properly now.
Otherwise you'll have problems later when you attempt to do upgrades ... better to know now than to be surprised later.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I had a functioning store at my new host until a couple of hours ago - now it won't load and the browser is looking for the aforementioned zc_install folder. I don't see that folder on the "downloads" page here - where's the folder, Doc?
Sorry if I'm missing something obvious, I'm a little brain-fried - due to go live with the store at midnight and everything was working fine until this popped up. Help would be much appreciated & I will keep working on it as well. Thanks!
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Yep - Totally brain-fried. The zc_install folder isn't supposed to be there, it's only for initial installation. So why is my browser suddenly looking for it? Very odd stuff and the shop was just working - and now it's not. Crazy.
BTW I ended up in this thread because I was getting an autoload error:
1-Dec-2007 16:00:44] PHP Fatal error: Cannot instantiate non-existent class: notifier in /home/tgadmin/public_html/shop/includes/autoload_func.php on line 156
Web site is www.transgentry.com if you want to have a look. www.transgentry.com/shop just won't come up anymore. I'm stunned.
Do I have to reinstall the store because I moved it? :shocking:
-
Re: Problem with install - cannot instantiate class - autoload_func.php
A URL?
Hard to believe that a functioning site completely dropped off the internet without a host problem.
No Admin or Cart?
The zc_install directory is part of the full cart download and not left behind when Fantastico loads a fresh cart. You can download the cart from here and upload the directory by FTP.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
first its functioning and BOOM it quits. Then you say you moved it.:lookaroun
Have you made sure that BOTH configure.php files are correct with the move?
admin/includes/configure.php and includes/configure.php should both be correct. When they are not, the system looks for the zc_install directory to try to get the configure files ... well .... configured.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I lobbed an addendum in there on you, sorry. Going to generate a ticket with the new host, I seem to be having multiple issues so maybe it's not me. I have three accounts with them and none of the shops are loading. Index.html pages load but not the shops.
Thanks for your help, I will keep checking back in case you have some idea what might have snapped. Really appreciate the support I get here, guess I will be buying you donuts and coffee again soon!
*I'll go check those files - Thanks!
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Change the .html files to .lmht and see if that doesn't work. Those should have gone by-by. I wouldn't delete them till you know they aren't containing something important.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
You were right, the configure.php files had old info in them. Still not working though - now I get these errors:
Warning: is_dir() [function.is-dir]: Stat failed for /home/buzzardr/public_html/tgadmin/shop//includes/classes (errno=13 - Permission denied) in /home/tgadmin/public_html/shop/includes/application_top.php on line 132
Warning: Cannot modify header information - headers already sent by (output started at /home/tgadmin/public_html/shop/includes/application_top.php:132) in /home/tgadmin/public_html/shop/includes/application_top.php on line 132
Fatal error: Cannot instantiate non-existent class: notifier in /home/tgadmin/public_html/shop/includes/autoload_func.php on line 156
Should I still change .html files to .lmht?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Travel once again to both configs. There are several places where the information must be correct.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I am learning much, Sensei, but apparently not yet enough.
Decided to start at the top and fix the config files for the buzzardr home account, and did, and was able to get the BR shop to load there. Small victory. There's a red banner that says I need to change permissions on a config file but I did that. I'll worry about it later.
Went back to tgadmin and combed both config files, made the new changes I learned to make in the buzzardr config files. Saved everything and tried again - and got the same exact error messages again. But I will keep working. Since it worked for the buzzardr account, something has to work for tgadmin - I just have to find what's broke. Could be as simple as syntax, I guess. I will post again when I fix it - or if I decide to seek more help.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
See comments in Red
Quote:
Originally Posted by
brodybro1
I am learning much, Sensei, but apparently not yet enough.
Decided to start at the top and fix the config files for the buzzardr home account, and did, and was able to get the BR shop to load there. Small victory. There's a red banner that says I need to change permissions on a config file but I did that. I'll worry about it later. You may have to change the permissions through your host's control panel.
Went back to tgadmin and combed both config files, made the new changes I learned to make in the buzzardr config files. Saved everything and tried again - and got the same exact error messages again. But I will keep working. Since it worked for the buzzardr account, something has to work for tgadmin - I just have to find what's broke. Could be as simple as syntax, I guess. I will post again when I fix it - or if I decide to seek more help. Is just one side broken or do both the cart and admin malfunction?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I get these errors for admin:
Warning: main(/home/buzzardr/public_html/tgadmin/shop/includes/autoload_func.php) [function.main]: failed to open stream: Permission denied in /home/tgadmin/public_html/shop/admin/includes/application_top.php on line 273
Warning: main(/home/buzzardr/public_html/tgadmin/shop/includes/autoload_func.php) [function.main]: failed to open stream: Permission denied in /home/tgadmin/public_html/shop/admin/includes/application_top.php on line 273
Fatal error: main() [function.require]: Failed opening required '/home/buzzardr/public_html/tgadmin/shop/includes/autoload_func.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tgadmin/public_html/shop/admin/includes/application_top.php on line 273
I will see if there's another place in the control panel to change file permissions - I was doing it in the file manager.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
please post both your config files WITHOUT username and password. The two files mentioned in your error do not have 273 lines of code combined:shocking:
Your version?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
For Zen Cart v. 1.3.7.1
/public_html/shop/admin/includes/configure.php
----------------------------------------------
application/x-httpd-php configure.php
PHP script text
<?php
//
/**
*
* @package Configuration Settings
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/
/*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
// Define the webserver and path parameters
// Main webserver: eg, http://localhost - should not be empty for productive servers
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
/*
* URLs for your site will be built via:
* HTTP_SERVER plus DIR_WS_ADMIN or
* HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
* HTTP_SERVER plus DIR_WS_CATALOG or
* HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
* ...depending on your system configuration settings
*/
define('HTTP_SERVER', 'http://transgentry.com');
define('HTTPS_SERVER', 'https://transgentry.com');
define('HTTP_CATALOG_SERVER', 'http://transgentry.com');
define('HTTPS_CATALOG_SERVER', 'https://transgentry.com');
// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/shop/admin/');
define('DIR_WS_CATALOG', '/shop/');
define('DIR_WS_HTTPS_ADMIN', '/shop/admin/');
define('DIR_WS_HTTPS_CATALOG', '/shop/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/home/tgadmin/public_html/shop/admin/');
define('DIR_FS_CATALOG', '/home/tgadmin/public_html/shop/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '**********');
define('DB_SERVER_PASSWORD', '*******');
define('DB_DATABASE', '********');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/tgadmin/public_html/shop/cache');
?>
I'll post the other file in a separate window - I did just now spot the db server designation of "localhost' - do I need to post a specific server name there?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
/public_html/shop/includes/configure.php
application/x-httpd-php configure.php
PHP script text
<?php
/**
*
* @package Configuration Settings
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/
/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/*************** The 2 files should be kept separate and not used to overwrite each other. ***********/
// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
define('HTTP_SERVER', 'http://transgentry.com');
define('HTTPS_SERVER', 'https://transgentry.com');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/shop/');
define('DIR_WS_HTTPS_CATALOG', '/shop/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
define('DIR_WS_PHPBB', '/');
// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/tgadmin/public_html/shop/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', '*********');
define('DB_SERVER_PASSWORD', '*********');
define('DB_DATABASE', '*********');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/tgadmin/public_html/shop/cache');
?>
I returned both these files as close to how they were originally as I could; was basically undoing changes as soon as I saw what didn't work.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Actually the full path was originally written as: /home/buzzardr/public_html/tgadmin/shop/
The actual path appears to be more like:
/home/buzzardr/public_html/tgadmin/public_html/shop/
I did try this but still got the same errors. So then I truncated the path to simply /home/tgadmin/public_html/shop/ and got fewer errors - but that's probably because I diminished accessibility to my site.
buzzardr administers tgadmin. In the old account the path was just like this. In the new account I'm not certain how buzzardr ties to tgadmin. My new file structure doesn't show this - everything is separate.
I really appreciate the help I'm getting here - my brain is out of practice for this kind of thinking.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Okay.
I have compared the buzzardr config files that work, to the tgadmin config files that do not.
I have compared the config files from the old server that were working, to the new config files that, again, do not work.
I have made adjustments per these comparisons. The store still doesn't work.
As I see it now my options are to:
Try running a database repair, which is a little scary.
Try moving the Shop folder directly into the tgadmin home folder, where it was on the old server.
Reinstall the whole store and run a whole new gamut of issues.
Upgrade to v. 1.3.8a and, again, deal with a whole new group of problems.
They say whatever you are doing at midnight on New Year's is what you will be doing for the rest of the year. I don't mind that I'm working, that's a good thing. But I really would like to be successful before I give it up and go to bed.
I will therefore keep working.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I have now learned to use the code editor to quickly find lines cited in error messages. I'm very excited.
Apparently this line in shop/includes/application_top.php is exceedingly offensive:
if (!is_dir(DIR_FS_CATALOG.'/includes/classes')) header('location: zc_install/index.php');
I will keep digging.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
brodybro1, you're having such a good conversation with yourself I almost hate to barge in. :smile:
In both your 'config' files, change the following:
- from
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/tgadmin/public_html/shop/cache');
?>
- to
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/home/tgadmin/public_html/shop/cache');
?>
See what happens.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
LMAO! Thank the Gods, I thought I would never shut up.
This looks almost promising -
In shop I now get:
Warning: Cannot modify header information - headers already sent by (output started at /home/tgadmin/public_html/shop/includes/classes/class.smtp.php:2019) in /home/tgadmin/public_html/shop/includes/init_includes/init_database.php on line 57
In admin I now get this message:
0 DB_ERROR_NOT_CONNECTED
in:
[db_cache table]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
I already went looking in the files for spaces in the php coding but maybe I missed something? :blink:
-
Re: Problem with install - cannot instantiate class - autoload_func.php
I keep seeing references to 'zc_install/index.php' in the lines of code referenced by the error messages. Is this significant to the problem at hand?
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Going to try a database repair... someone else had the "Cannot modify header information" error and I also have the DB_ERROR_NOT_CONNECTED so...
*Nope, no difference.
NEXT -
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Every place where zc_install/index.php is referenced is inside a safety condition clause that will only send you to zc_install if the safety check fails.
Common causes of the failures are:
- incomplete uploads of all the files on your site (did your FTP upload fail on anything? are you SURE?)
- incomplete configure.php files
- incorrect contents in your configure.php files
- incorrect settings for accessing your database ... in the configure.php files.
Here's an FAQ on the move process: https://www.zen-cart.com/tutorials/i...hp?article=100
You might need to do a comparison of what you uploaded vs what you attempted to upload (by re-downloading it to another folder, and comparing the folders): http://www.zen-cart.com/wiki/index.p...Obscure_Issues
And you will need to be sure your configure.php files are correct.
One way to get correct configure.php files for the new server is to do a FRESH install on the new server, preserve the generated configure.php files, and then import your database again ... as explained in the FAQ.
-
Re: Problem with install - cannot instantiate class - autoload_func.php
:frusty:
As much as I'm enjoying navigating the labyrinth it's probably best if I just start over. I really wanted to win this one but you're right.
Tomorrow I will back up my databases and shop, and do a fresh install. Compare the configure.php files so I can learn what a Proper configure.php file looks like. It'll just Work if I do that.
Thanks for all the help, I'm learning it. And I'll make another donation when I get paid again, for sure.
Happy New Year - Brody
-
Re: Problem with install - cannot instantiate class - autoload_func.php
Follow-up: I got my store up the next day & so far everything works now. What's truly sick is, I can't wait to build another one with v1.3.8a,and to start modding on both of them.
I think I've been Zenned. Thanks again for the great help - and tremendous patience - all of you offer up here on an hourly basis.