Zen Cart Logo
Forums / General Questions / PHP Fatal error: Uncaught Error: Class not found

PHP Fatal error: Uncaught Error: Class not found

Views: 906

Results 1 to 8 of 8
17 Apr 2020, 12:53 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

PHP Fatal error: Uncaught Error: Class not found

Hi I am getting this error when trying to access my admin:

[17-Apr-2020 12:50:26 UTC] Request URI: /lrbits.co.uk/administration/index.php, IP address: 127.0.0.1
--> PHP Fatal error: Uncaught Error: Class 'AdminRequestSanitizer' not found in /Applications/MAMP/htdocs/MYWEBSITE/administration/includes/init_includes/init_sanitize.php:19
Stack trace:
#0 /Applications/MAMP/htdocs/MYWEBSITE/includes/autoload_func.php(48): require()
#1 /Applications/MAMP/htdocs/MYWEBSITE/administration/includes/application_top.php(171): require('/Applications/M...')
#2 /Applications/MAMP/htdocs/MYWEBSITE/administration/index.php(10): require('/Applications/M...')
#3 {main}
thrown in /Applications/MAMP/htdocs/MYWEBSITE/administration/includes/init_includes/init_sanitize.php on line 19.

I'm using PHP 7.3. Tried 7.1 and 7.2 as well.

I've tried overwriting the relevant files, but still the same. Any ideas?

17 Apr 2020, 1:56 PM
#2
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: PHP Fatal error: Uncaught Error: Class not found

does this file exist:

admin/includes/classes/AdminRequestSanitizer.php

17 Apr 2020, 2:10 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: PHP Fatal error: Uncaught Error: Class not found

carlwhat:

does this file exist:

admin/includes/classes/AdminRequestSanitizer.php

Yes it does

17 Apr 2020, 2:31 PM
#4
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: PHP Fatal error: Uncaught Error: Class not found

what about this file:

admin/includes/auto_loaders/config.adminSanitize.php

are you using ZC156?

there look to be only 3 files that deal with the loading of the sanitizer. i would compare all 3 versions with the released versions.

you can also turn on the debug autoloading:

define('DEBUG_AUTOLOAD', true);

it is a little tricky figuring out these loading problems, but not impossible.

17 Apr 2020, 2:41 PM
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: PHP Fatal error: Uncaught Error: Class not found

carlwhat:

what about this file:

admin/includes/auto_loaders/config.adminSanitize.php

are you using ZC156?

there look to be only 3 files that deal with the loading of the sanitizer. i would compare all 3 versions with the released versions.

you can also turn on the debug autoloading:

define('DEBUG_AUTOLOAD', true);

it is a little tricky figuring out these loading problems, but not impossible.

Yes I am using 1.5.6c, I'll give it another look in a bit and see if I can figure it out as you are right, kit has to be one of those three files but I have already tried overwriting them all with the raw files from 1.5.6c

17 Apr 2020, 3:28 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: PHP Fatal error: Uncaught Error: Class not found

What about admin/includes/auto_loaders/config.adminSanitize.php that actually has content in it such as:
$autoLoadConfig[0][] = ...

17 Apr 2020, 4:05 PM
#7
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: PHP Fatal error: Uncaught Error: Class not found

mc12345678:

What about admin/includes/auto_loaders/config.adminSanitize.php that actually has content in it such as:
$autoLoadConfig[0][] = ...

That file was missing. Just put it in and the admin now loads. Thanks very much for that.

17 Apr 2020, 4:52 PM
#8
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,956
Plugin Contributions:
8

Re: PHP Fatal error: Uncaught Error: Class not found

carlwhat:

what about this file:

admin/includes/auto_loaders/config.adminSanitize.php

.......

mc12345678:

What about admin/includes/auto_loaders/config.adminSanitize.php that actually has content in it such as:
$autoLoadConfig[0][] = ...

i suppose when i asked about that same file a couple of posts earlier, you missed it?