Jump to content

Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/html/classes/db/Db.php


prestol

Recommended Posts

Hello 

turning on debug mode produces this error

prestashop: 17.6

php: 7.2.22


Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/html/classes/db/Db.php:794 Stack trace: #0 /var/www/html/config/alias.php(47): DbCore->escape('configuration', false) #1 /var/www/html/config/alias.php(52): pSQL('configuration') #2 /var/www/html/classes/Configuration.php(155): bqSQL('configuration') #3 /var/www/html/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /var/www/html/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /var/www/html/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /var/www/html/config/config.inc.php(85): spl_autoload_call('Tools') #8 /var/www/html/adminfolder/index.php(40): require('/var/www/html/c...') #9 {main} thrown in /var/www/html/classes/db/Db.phpon line 794

selinux is disabled

 

how to fix it

 

Edited by prestol (see edit history)
Link to comment
Share on other sites

Hello
Yes, its there

i downloaded the latest and replaced the old once, same error

 

[root@centosVM classes]# ls -la /var/www/html/classes/ |grep Tool
-rw-r--r--.  1 apache apache 146546 Jul 30 20:36 Tools.php


[root@centosVM classes]# cp Tools.php /var/www/html/classes/
cp: overwrite ‘/var/www/html/classes/Tools.php’? y
[root@centosVM classes]# 
[root@centosVM classes]# 
[root@centosVM classes]# systemctl restart httpd

[root@centosVM classes]# 

 

Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/html/classes/db/Db.php:794 Stack trace: #0 /var/www/html/config/alias.php(47): DbCore->escape('configuration', false) #1 /var/www/html/config/alias.php(52): pSQL('configuration') #2 /var/www/html/classes/Configuration.php(155): bqSQL('configuration') #3 /var/www/html/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /var/www/html/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /var/www/html/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /var/www/html/config/config.inc.php(85): spl_autoload_call('Tools') #8 /var/www/html/adminfolder/index.php(40): require('/var/www/html/c...') #9 {main} thrown in /var/www/html/classes/db/Db.php on line 794

 

Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...
  • 8 months later...
On 7/10/2020 at 8:33 AM, SMTmardan said:

For any one who facing this issue, just delete or rename the DEV & PROD folders in /var/cache/  error will gone, its a cache issue more likely with multi stores

no such folders anywhere

Still the error comes up

Link to comment
Share on other sites

 

7 minutes ago, Nickz said:

in the install folder called /tb path is home/admin/web/xxxx.com/public_html/tb

Latest version.

var/cache is under the root folder of the server. Same level etc is on.

 

So delete this cache folder - Also the Var folder will be in home/admin/web/xxxx.com/public_html/Var  if its not there  that will mean that you have permission issues, that is why the VAR folder is not creating automatically

(You are just near - Think forward how to do it)

Link to comment
Share on other sites

20 hours ago, Nickz said:

I slowly come to think that you lack insight about linux servers. 

 

insight.png

And what is inside TB folder? please note that the files does not differentiated in linux or any other servers, they remain the same in a folder.  

Link to comment
Share on other sites

2 hours ago, SMTmardan said:

And what is inside TB folder? please note that the files does not differentiated in linux or any other servers, they remain the same in a folder.  

The solution was to grant permission to www-data in cache, themes, mails, install and config.

As I said there are no var folders inside public_html

Link to comment
Share on other sites

On 5/11/2021 at 3:23 AM, SMTmardan said:

 

So delete this cache folder - Also the Var folder will be in home/admin/web/xxxx.com/public_html/Var  if its not there  that will mean that you have permission issues, that is why the VAR folder is not creating automatically

(You are just near - Think forward how to do it)

Please look at my first message , i told u its permission issue. anyways its good u had fixed it

Link to comment
Share on other sites

  • 5 months later...
On 7/10/2020 at 2:33 PM, SMTmardan said:

For any one who facing this issue, just delete or rename the DEV & PROD folders in /var/cache/  error will gone, its a cache issue more likely with multi stores

 

Thanks

It worked for me, thank you so much.

Link to comment
Share on other sites

  • 1 month later...
On 7/10/2020 at 2:33 PM, SMTmardan said:

For any one who facing this issue, just delete or rename the DEV & PROD folders in /var/cache/  error will gone, its a cache issue more likely with multi stores

 

Thanks

Sorry to refloat this thread, but I have a similar error and cannot fix it in any way. I have already deleted the contents of the var / cache folders, but there is no way.

AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Class 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' not found in /furanet/sites/mt.com/web/htdocs/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:559\nStack trace:\n#0 
[internal function]: Symfony\\Component\\Debug\\ErrorHandler->handleException(Object(Error))\n#1 {main}\n  thrown in /furanet/sites/mt.com/web/htdocs/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line 559
PHP message: PHP Fatal error:  Uncaught Error: Class 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' not found in /furanet/sites/mt.com/web/htdocs/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:685\nStack trace:\n#0 
[internal function]: Symfony\\Component\\Debug\\ErrorHandler::handleFatalError()\n#1 {main}\n  thrown in /furanet/sites/mt.com/web/htdocs/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line 685', 

Prestashop version is 1.7.8.2 and php 7.3

Thank you so much

Link to comment
Share on other sites

11 minutes ago, Nickz said:

That is new or did you do something? And if yes what did you do?

I´ve already deleted the var/cache content, but it doesn´t work. 

I cannot acces to the backoffice, we obtain a 500 error. Is something intermittent. sometimes it´s work correctly. 

Link to comment
Share on other sites

30 minutes ago, eresturamoncin said:

I cannot acces to the backoffice, we obtain a 500 error. Is something intermittent. sometimes it´s work correctly. 

What have you done to cause that.

It won't happen out of nothing. Except if your server outphased a php version the shop need to work smoothly.

Edited by Nickz (see edit history)
Link to comment
Share on other sites

I don't know what caused it. It is difficult to know from when it fails, as I already said that it is intermittent. The front works correctly. But it's quite annoying having to reload the backoffice page while serving customers. I have also tried to deactivate the few modules that I have not native to prestashop, but it does not work.

Thank you for your time. 

Link to comment
Share on other sites

 

On 1/7/2022 at 1:38 AM, eresturamoncin said:

I don't know what caused it. It is difficult to know from when it fails, as I already said that it is intermittent. The front works correctly. But it's quite annoying having to reload the backoffice page while serving customers. I have also tried to deactivate the few modules that I have not native to prestashop, but it does not work.

Thank you for your time. 

Please turn on Debug mode and post the error.

Seems PHP 7.3 is not compatible with one of your module, also try to downgrade the PHP version and check.

Best regards

Link to comment
Share on other sites

On 1/12/2022 at 9:51 AM, SMTmardan said:

 

Please turn on Debug mode and post the error.

Seems PHP 7.3 is not compatible with one of your module, also try to downgrade the PHP version and check.

Best regards

Thank you for your time. 

I just upgrade PHP version to 7.4 and the error keeps happening. The debug does not provide any type of additional information because the 500 error is before the debug starts to act. I'm desperate now. I do not know what else to do. I have disabled the modules that are not native to prestashop and the same thing keeps happening.

Link to comment
Share on other sites

3 hours ago, eresturamoncin said:

Thank you for your time. 

I just upgrade PHP version to 7.4 and the error keeps happening. The debug does not provide any type of additional information because the 500 error is before the debug starts to act. I'm desperate now. I do not know what else to do. I have disabled the modules that are not native to prestashop and the same thing keeps happening.

Please Downgrade it :) not upgrade... to turn on Debbug mode manually please read this guide 

https://zemez.io/support/prestashop/how-to/prestashop-1-7-enable-debug-mode-display-errors/#:~:text=In your PrestaShop admin panel,Save the changes.

 

Regards

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...