Prestashop PHP Fatal error: Uncaught Error: Class 'Tools' - class

Having this error on latest prestashop version:
PHP Fatal error: Uncaught Error: Class 'Tools' not found in /home/domain_name/config/config.inc.php:86
thrown in /home/domain_name/config/config.inc.php on line 86
Prestashop version is 1.7.1.2.
I tried to download this version again and replaced config/folder.
This didnt work.
Have no clue what to do

First, you have to install the Prestashop 1.7.1.2 by giving permission 0755 to folder. Then try to replace the config folder.
Note: Make sure that you are replaced the folder from Prestashop 1.7.x.x not from Prestashop 1.6 or 1.5.

Try to delete /var/cache (for 1.7)
And/or check please:
File owner and permissions,
Is there classes/Tools.php?
Replace all files with the same version.

Related

There is not this file and I get ERROR in ./node_modules/#mui/x-date-pickers/node_modules/#mui/utils/esm/index.js

I am trying to use #mui/x-data-grid-premium trial version.
Before the npm install #mui/x-data-grid-premium everything works fine. After the installation, I changed DataGrid to DataGridPremium and I saved the file then my site shows the following error
`ERROR in ./node_modules/#mui/x-date-pickers/node_modules/#mui/utils/esm/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: ENOENT: no such file or directory, open 'C:\Users..\frontend\node_modules#mui\x-date-pickers\node_modules#mui\utils\esm\index.js'`

Prestashop broken after module PayPal installed

I installed PayPal module on my Prestashop site with version 1.5, after that I received this error if I try to contact my web site:
Warning: require(/web/htdocs/www.safarino.it/home/modules/paypal/backward_compatibility/backward.php): failed to open stream: No such file or directory in /web/htdocs/www.safarino.it/home/modules/paypal/paypal.php on line 127 Warning: require(/web/htdocs/www.safarino.it/home/modules/paypal/backward_compatibility/backward.php): failed to open stream: No such file or directory in /web/htdocs/www.safarino.it/home/modules/paypal/paypal.php on line 127 Fatal error: require(): Failed opening required '/web/htdocs/www.safarino.it/home/modules/paypal/backward_compatibility/backward.php' (include_path='.:/php5.6/lib/php/') in /web/htdocs/www.safarino.it/home/modules/paypal/paypal.php on line 127
How can I fixed them ?
I cannot remove this module because also web panel is broken
Rename your module folder in FTP from "paypal" to something else like "paypal.bak",
this way module will not be loaded at runtime and you'll get access again to your backoffice.
That said, I am not sure Paypal module is still compatible with Prestashop 1.5.
Consider upgrading Prestashop to 1.7 version (or at least 1.6) since 1.5 is over 6 years old and you will have other major issues other than Paypal sooner or later..

I can't add pgsql PDO Driver in MAMP on Mac Big Sur

I have installed MAMP and PostgreSQL with PGAdmin4, but I'm having some problems.
I'm getting a psql "command not found error" in my terminal. I have added export PATH=/Library/PostgreSQL/10/bin:$PATH into ~/.bash_profile, but whenever I reopen the terminal, I get the same error again.
Whenever I try to execute composer or php artisan in my Laravel project I get the below errors, but I'm still able to migrate database:
Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/local/lib/php/pecl/20180731/pdo_pgsql (dlopen(/usr/local/lib/php/pecl/20180731/pdo_pgsql, 9): image not found)
Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/local/lib/php/pecl/20180731/pgsql (dlopen(/usr/local/lib/php/pecl/20180731/pgsql, 9): image not found)
Getting a "driver not found" error whenever trying to browse the project and in PDO Drivers list in phpinfo(), mysql and sqlite available, but pgsql is not available.
MAMP
PostgreSQL 10
PHP: 7.3.21
OS: MAC Big Sur
I had the same issue and when I looked in my php.ini file, I saw that my extensions folder was pointed to the wrong location:
extension_dir = "/Applications/MAMP/bin/php/php7.4.2/lib/php/extensions"
But I don't have a matching directory for php7.4.2 - I use php7.4.9, and confirmed the extension exists in that folder. To fix it for me, I just had to change the above line in my php.ini file to:
extension_dir = "/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions"
And then all was good for me.

UmbracoCms installation error

I'm getting this error when I try to run the following line:
Install-Package UmbracoCms
And I'm getting this error:
Install-Package : An error occurred while downloading package 'Newtonsoft.Json.10.0.2 : ' from source 'https://www.nuget.org/api/v2/'
I have tried to do the following:
Install-Package Newtonsoft.Json -Version 10.0.2
And I still got this error:
Package 'Newtonsoft.Json.10.0.2 : ' does not exist in project 'Umbraco_MVC'
I also tried to delete the line with Newtonsoft in packages.config, but there is no line with that reference there
If I'm reading this correctly, and you're having an issue with getting JSON.NET installed through NuGet through both methods, then this (loosely related) GitHub issue thread might be of use to you.
https://github.com/google/google-api-dotnet-client/issues/1041
It involves changing the NuGet API URL you use to a newer version.
If your installation IS working, but you're still getting an issue, check your website bin folder to see if the dll is there. If not, check the References section of your web project to see if the dll is being referenced by your project.

Installing SimpleSAMLphp on Windows

I have PHP installed on my windows instance, have copied across the folder.
On running the script I get the following error.
PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to load Composer autoloader' in C:\Users\Chris\Dropbox\WEBSITES\php_tests\lib\_autoload.php:18
Stack trace:
#0 C:\Users\Chris\Dropbox\WEBSITES\php_tests\login\_include.php(32): require_once()
#1 C:\Users\Chris\Dropbox\WEBSITES\php_tests\login\index.php(3): require_once('C:\\Users\\Chris\\...')
#2 {main}
thrown in C:\Users\Chris\Dropbox\WEBSITES\php_tests\lib\_autoload.php on line 18
I can't work out how to fix.
Go here to download the latest simplesamlphp as described here. This file will probably end in .tar.gz and comes with required dependencies like Composer autoloader.
Do not download the latest from the github. This file will probably end in .zip and it doesn't come with required dependencies like Composer autoloader. Using this file for install can lead to an error like mention in your question.