Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Problem with install - cannot instantiate class - autoload_func.php

Problem with install - cannot instantiate class - autoload_func.php

Locked

Views: 8,526

Results 1 to 20 of 31
This thread is locked. New replies are disabled.
04 Jul 2007, 13:12
#1
msd avatar

msd

New Zenner

Join Date:
Jul 2007
Posts:
3
Plugin Contributions:
0

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?

04 Jul 2007, 14:51
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

05 Jul 2007, 12:50
#3
msd avatar

msd

New Zenner

Join Date:
Jul 2007
Posts:
3
Plugin Contributions:
0

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:

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.

05 Jul 2007, 15:28
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

05 Jul 2007, 17:45
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Problem with install - cannot instantiate class - 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 )

05 Jul 2007, 19:27
#6
msd avatar

msd

New Zenner

Join Date:
Jul 2007
Posts:
3
Plugin Contributions:
0

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.

05 Jul 2007, 20:20
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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.

31 Dec 2007, 22:47
#8
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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!

31 Dec 2007, 23:06
#9
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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 https://www.transgentry.com if you want to have a look. https://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:

31 Dec 2007, 23:12
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

31 Dec 2007, 23:19
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

31 Dec 2007, 23:36
#12
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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!

31 Dec 2007, 23:55
#13
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

01 Jan 2008, 00:01
#14
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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?

01 Jan 2008, 00:15
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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.

01 Jan 2008, 02:00
#16
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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.

01 Jan 2008, 02:11
#17
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Problem with install - cannot instantiate class - autoload_func.php

See comments in Red

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?

01 Jan 2008, 02:23
#18
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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.

01 Jan 2008, 03:40
#19
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

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?

01 Jan 2008, 04:08
#20
brodybro1 avatar

brodybro1

New Zenner

Join Date:
Aug 2006
Location:
New Mexico
Posts:
36
Plugin Contributions:
0

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?