Describe the bug
Class 'Tools' not found in /public_html/classes/db/Db.php:794
When I ask to clear cache
To Reproduce
Performance, Clear Cache
Solution... waiting for real solution
line 794 of classes/db/Db.php
change to : $string = strip_tags(nl2br($string));
instead of : $string = strip_tags(Tools::nl2br($string));
I reload all files from /classes and /controllers, but the problem continue.
Additionnal information
PrestaShop version: 1.7.5.0 and 1.7.5.1
PHP version: 7.2
Hi @pppplus,
Thanks for your report.
I did not manage to reproduce the issue with PS1.7.5.1 (fresh install & after upgrade from PS1.7.5.0)
Did you click on the "Clear cache" button twice?
Thanks!
No, only once.
And it do it every times.
I will try on a fresh install today, and will come back.
@pppplus,
Thanks!
Waiting for your feedback.
Hello @pppplus,
line 794 of classes/db/Db.php
change to : $string = strip_tags(nl2br($string));
instead of : $string = strip_tags(Tools::nl2br($string));
I think it's a good solution: can you create the pull request, please?
Micka毛l
no, because nl2br without Tools is not correct in Prestashop.
But... I see also strip_tags, and I think it should be also Tools::strip_tags...
So, probably Tools is not well implemented ?
But if you have no error, maybe something is wrong with my installation.
@pppplus, did you make a fresh install PS1.7.5.1?
Did you check it?
Thanks!
I get the same error after Update from 1.7.4.4 to 1.7.5.1
@didi-2018, in my case, it is OK.
I attached a video record.
https://drive.google.com/file/d/1Q-cFBLskGH_QGhJhdVCtxUBbFw5FECEO/view
Thanks!
Hi
I just do a fresh install.
I've done nothing in the installation.
i click on clear cache and I have exactly the same error.
Fatal error: Uncaught Error: Class 'Tools' not found in /home/my/path/to/public_html/test1751/classes/db/Db.php:794 Stack trace: #0 /home/my/path/to/public_html/test1751/config/alias.php(48): DbCore->escape('configuration', false) #1 /home/my/path/to/public_html/test1751/config/alias.php(53): pSQL('configuration') #2 /home/my/path/to/public_html/test1751/classes/Configuration.php(155): bqSQL('configuration') #3 /home/my/path/to/public_html/test1751/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /home/my/path/to/public_html/test1751/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /home/my/path/to/public_html/test1751/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /home/coque/ in /home/my/path/to/public_html/test1751/classes/db/Db.php on line 794
Hi @pppplus,
Thanks for your feedback.
Sorry, I tried with another shop 1.7.5.1, but it is OK when I try to delete the cache (PHP7.2 / PHP7.0)
@marionf, what do you think?
Thanks!
@khouloudbelguith can you please try again and enable Debug mode first?
@pppplus, it is OK.
I attached a video record.
https://drive.google.com/file/d/1EXLsBN9sIf3SnwgdmOnCFrmo0Was55V6/view
Thanks!
@khouloudbelguith I can't reproduce it either
Thanks you @marionf!
my conf :
Informations sur votre serveur Linux #1 SMP PVE 4.15.18-28 (Tue, 30 Oct 2018 14:27:50 +0100) x86_64
Version du logiciel serveur : Apache/2
Version de PHP : 7.2.15
Limite de m茅moire : 512M
Temps maximal d'ex茅cution : 360
Taille max. pour envoi de fichiers : 64M
info_outline Informations sur la base de donn茅es
Version de MySQL : 5.5.41-MariaDB
Serveur MySQL : 127.0.0.1
Moteur MySQL : InnoDB
Connecteur MySQL : DbPDO
Problem on a clean install
Problem on an update install 1.7.5.0 to 1.7.5.1 (and same problem on 1.7.5.0 previously)
Hi @pppplus,
Could you please follow this link: https://github.com/PrestaShop/php-ps-info
phppsinfo file provides an equivalent to the phpinfo() function that reports PrestaShop Requirements information about the PHP/MySQL/Apache environment and offers suggestions for improvement.
Thanks to check and feedback.
Hi @pppplus,
I tried with different servers (Nginx / apache ) => OK.
I tried with different versions PHP 5.6 / 7.2 / 7.0 => OK.
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
Thanks!
Really ??
With this php error :
Fatal error: Uncaught Error: Class 'Tools' not found in /home/my/path/to/public_html/test1751/classes/db/Db.php:794 Stack trace: #0 /home/my/path/to/public_html/test1751/config/alias.php(48): DbCore->escape('configuration', false) #1 /home/my/path/to/public_html/test1751/config/alias.php(53): pSQL('configuration') #2 /home/my/path/to/public_html/test1751/classes/Configuration.php(155): bqSQL('configuration') #3 /home/my/path/to/public_html/test1751/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /home/my/path/to/public_html/test1751/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /home/my/path/to/public_html/test1751/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /home/my/path/to/public_html/test1751/classes/db/Db.php on line 794
@pppplus, could you please try to clear cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.
Same error after deleting manually all the folder into var/cache (prod & dev).
@pppplus, thanks to check your file owner and permissions,
is there classes/Tools.php?
files owner and permissions has never been a problem.
/classes/Tools.php is called by a lot of files, not only Clear Cache.
So, if there was a problem of right, a lot of problem will occure.
/classes/Tools.php exists (site can't work without it)
Hi @pppplus,
Could you please provide me your exact settings smarty before clearing the cache.
To be sure about your install, it is a fresh install, you did not install any other modules or themes?
Thanks!
Yes, it's a fresh install, without any modification.
No template, no module.... NOTHING !
I just install from source, then click on Clear Cache (with Debug Mode)
Hi @pppplus,
I tried to create an environment similar to yours
Server software version: Apache/2.4.25 (Debian)
PHP version: 7.2.14
Memory limit: 128M
Max execution time: 30
Upload Max File size: 20M
MySQL version: 5.5.41-MariaDB-1~wheezy-log
PrestaShop version: 1.7.5.1
Fresh install 1.7.5.1, enable debug mode => save => Click on clear cache button => OK.
Thanks!
Hey @pppplus , I have the same exact error that I fixed by using @mickaelandrieu temporary workaround.
Are you using Plesk by any chance ? It could be some broken reference in classes somewhere I believe.
EDIT: I could not reproduce it with Debug Mode on, I had to turn it off to get the errors.
No, I use Directadmin.
Hi @pppplus,
Could check with your host, if there are some functions for security are blocked?
Thanks!
Because, I said before, despite our several trials, we could not reproduce your issue with the provided information.
Thanks for your understanding!
Hello
In my case I have the same issue on 3 websites hosted on my VPS.
Hi @go-sudo,
The three websites are hosted on the same server?
Thanks!
HI @khouloudbelguith
Yes,
Hi @go-sudo,
Thanks for your feedback.
Could you please provide us with more info:
Thanks!
CPU | Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (8 core(s))
-- | --
Version | Plesk Onyx v17.8.11_build1708180301.19 os_CentOS 7
OS | CentOS Linux 7.6.1810 (Core)
Informations sur votre serveur Linux #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64
Version du logiciel serveur : Apache
Version de PHP : 7.2.16
Limite de m茅moire : 5140M
Temps maximal d'ex茅cution : 3000
Taille max. pour envoi de fichiers : 200M
Version de MySQL : 5.5.60-MariaDB
Version de PrestaShop : 1.7.5.1
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/vhosts/playstore.ma/httpdocs/classes/db/Db.php:794\nStack trace:\n#0 /var/www/vhosts/playstore.ma/httpdocs/config/alias.php(48): DbCore->escape('configuration', false)\n#1 /var/www/vhosts/playstore.ma/httpdocs/config/alias.php(53): pSQL('configuration')\n#2 /var/www/vhosts/playstore.ma/httpdocs/classes/Configuration.php(155): bqSQL('configuration')\n#3 /var/www/vhosts/playstore.ma/httpdocs/classes/Configuration.php(209): ConfigurationCore::loadConfiguration()\n#4 /var/www/vhosts/playstore.ma/httpdocs/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...')\n#5 /var/www/vhosts/playstore.ma/httpdocs/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex()\n#6 [internal function]: PrestaShopAutoload->load('Tools')\n#7 /var/www/vhosts/playstore.ma/httpdocs/config/config.inc.php(85): spl_autoload_call('Tools')\n#8 /var/www/vhosts/playstore.ma/httpdocs/admin239cphwgn/index.php(42): require('/var/www...\n', referer: https://playstore.ma/index.php/configure/advanced/performance/?_token=txiE3cIzL0IvbcC-UjQSgd892plKp48ieNAG1FnbIs0
Hi @go-sudo,
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
Thanks!
Hi
That's not possible, it's a PHP error, with a Class not found.
It can't be a server configuration error.
The problem occurs on Plesk and directadmin in the different examples.
@pppplus,
Could check with your host, if there are some functions for security are blocked?
Thanks!
Because, I said before, despite our several trials, we could not reproduce your issue with the provided information.
Thanks for your understanding!
It's my server, and my own protection, as on the other servers I use.
And I've not the problem on all my prestashops (I've a lot of versions installed to test modules).
The problem is only in 1.7.5+ for me.
On 1.7.4.2, with the same configuration (but another vps), no problem.
Tomorrow, or wednesday, I will try a new installation on the same VPS where 1.7.4.2 is ok.
I will post here if the problem is always here or not.
Just for information :
PS 1.7.4.2 without error :
Informations sur votre serveur Linux #1 SMP PVE 4.15.18-28 (Tue, 30 Oct 2018 14:27:50 +0100) x86_64
Version du logiciel serveur : Apache/2
Version de PHP : 7.2.13
Limite de m茅moire : 128M
Temps maximal d'ex茅cution : 30
Taille max. pour envoi de fichiers : 64M
PS 1.7.5.+ with error :
Informations sur votre serveur Linux #1 SMP PVE 4.15.18-28 (Tue, 30 Oct 2018 14:27:50 +0100) x86_64
Version du logiciel serveur : Apache/2
Version de PHP : 7.2.15
Limite de m茅moire : 512M
Temps maximal d'ex茅cution : 360
Taille max. pour envoi de fichiers : 64M
HI @khouloudbelguith I contact plesk support and after their investigation it's a matter of prestashop
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/vhosts/ffff.ma/httpdocs/classes/db/Db.php:794\nStack trace:\n#0 /var/www/vhosts/ff.ma/httpdocs/config/alias.php(48): DbCore->escape('configuration', false)\n#1 /var/www/vhosts/fff.ma/httpdocs/config/alias.php(53): pSQL('configuration')\n#2 /var/www/vhosts/ff.ma/httpdocs/classes/Configuration.php(155): bqSQL('configuration')\n#3 /var/www/vhosts/fff.ma/httpdocs/classes/Configuration.php(209): ConfigurationCore::loadConfiguration()\n#4 /var/www/vhosts/ff.ma/httpdocs/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...')\n#5 /var/www/vhosts/fff.ma/httpdocs/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex()\n#6 [internal function]: PrestaShopAutoload->load('Tools')\n#7 /var/www/vhosts/ff.ma/httpdocs/config/config.inc.php(85): spl_autoload_call('Tools')\n#8 /var/www/vhosts/ff.ma/httpdocs/adminf/index.php(42): require('/var/www...\n', referer: https://ff.ma/admin2f/index.php/configure/advanced/performance/?_token=cFSSPTNtfATFXBtH7P3EkaHGS8A83YhiTqN_Nxife3c
Regards
Hi, have the exactly same pb on my shop, i have 2 fresh shops on same serveur:
1.7.5.0 -> no error
1.7.5.1 -> error
And i have multishop actived (with 2shops, 1 no b2b, 1 b2b)
(i have plesk too)
Hi @Thorfy,
Waiting for the response of the developers (#13355).
Thanks!
Thx for answer @khouloudbelguith
however, I can not reproduce the pb anymore.
Just after manually fully cleaning the var/cache/ folder and switch debug mod in true
it may be a corrupted cache, i don't know
I have the same error on Version de PrestaShop : 1.7.5.0
It's often when the cache is cleaned. Not every time but I would say 80% of times it fails..but it does clear the cache !
PHP message: PHP Fatal error: Uncaught Error: Class 'Tools' not found in [ROOT]/web/classes/db/Db.php:794
Stack trace:
This issue also for me (Presta 1.7.5.2 on php 7.2.19 debian)
Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/vhosts/100asa.it/httpdocs/classes/db/Db.php:794 Stack trace: #0 /var/www/vhosts/100asa.it/httpdocs/config/alias.php(48): DbCore->escape('configuration', false) #1 /var/www/vhosts/100asa.it/httpdocs/config/alias.php(53): pSQL('configuration') #2 /var/www/vhosts/100asa.it/httpdocs/classes/Configuration.php(155): bqSQL('configuration') #3 /var/www/vhosts/100asa.it/httpdocs/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /var/www/vhosts/100asa.it/httpdocs/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /var/www/vhosts/100asa.it/httpdocs/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /var/www/vhosts/100asa.it/httpdocs/config/config.inc.php(85): spl_autoload_call('Tools') #8 /var/www/vhosts/100asa.it/httpdocs/Back100asa/index.php(42): require('/var/www/vhosts...') #9 {main} thrown in /var/www/vhosts/100asa.it/httpdocs/classes/db/Db.php on line 794
1 click on clear smarty-cache, but smarty cache is disabled!
Debug active, prestashop 1.7.5.2
when trying to clear the cache, the message skips.
PrestaShop 1.7.6.0 has the problem with Server Plesk Onyx ver 17.8.11 CentOS Linux 7.6.1810 (Core)
Fatal error: Uncaught Error: Class 'Tools' not found in /var/www/vhosts/ideepercasa.shop/httpdocs/classes/db/Db.php:794 Stack trace: #0 /var/www/vhosts/ideepercasa.shop/httpdocs/config/alias.php(47): DbCore->escape('configuration', false) #1 /var/www/vhosts/ideepercasa.shop/httpdocs/config/alias.php(52): pSQL('configuration') #2 /var/www/vhosts/ideepercasa.shop/httpdocs/classes/Configuration.php(155): bqSQL('configuration') #3 /var/www/vhosts/ideepercasa.shop/httpdocs/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /var/www/vhosts/ideepercasa.shop/httpdocs/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /var/www/vhosts/ideepercasa.shop/httpdocs/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /var/www/vhosts/ideepercasa.shop/httpdocs/config/config.inc.php(85): spl_autoload_call('Tools') #8 /var/www/vhosts/ideepercasa.shop/httpdocs/admIdeePerCasa/index.php(40): require('/var/ww in /var/www/vhosts/ideepercasa.shop/httpdocs/classes/db/Db.php on line 794
The error with Plesk 17.5.3 and 17.8.11 occurs with FPM served by Apache, using FastCGI, prestashop does not generate the error. It's a very strange problem, I did some tests, I have 2 servers with identical versions of Plesk and CentOS, the same updates and the same configurations. On one PrestaShop 1.7.5.2 and 1.7.6.0 does not present the problem. So I can rule out that this is a server configuration problem. The only difference between the two servers is hardware, the one in which I have the problem has SSD disks, actually I know that on 5 Plesk servers I only check on the two with SSD disk, but it can also be a coincidence.
turning on debug mode produces
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/index.php(27): require('/var/www/html/c...') #9 {main} thrown in /var/www/html/classes/db/Db.php on line 794
prestashop: 1.7.6
php: 7.2
fix with change this line:
line 797 file classes/db/DB.php
change line 796:
$string = strip_tags(Tools::nl2br($string));
with this:
$string = str_replace(array("\r\n", "\r", "\n", AddressFormat::FORMAT_NEW_LINE, PHP_EOL), '
', $string);
For people using Plesk, this is the solution for your problem.
Disable PHP-FPM and set FastCGI instead in PHP Settings.
Memcached and php-fpm can't work together on prestashop.
After switching to FastCGI issue was gone.
For people using Plesk, this is the solution for your problem.
Disable PHP-FPM and set FastCGI instead in PHP Settings.
Memcached and php-fpm can't work together on prestashop.
After switching to FastCGI issue was gone.
@khouloudbelguith Why this issue is closed? What is the official step to fix this problem. I don't have memcached and opcache enabled but I do have PHP-FPM does that mean Prestashop doesn't compatible with PHP-FPM? Sigh.
fix with change this line:
line 797 file classes/db/DB.php
change line 796:
$string = strip_tags(Tools::nl2br($string));
with this:
$string = str_replace(array("\r\n", "\r", "\n", AddressFormat::FORMAT_NEW_LINE, PHP_EOL), '
', $string);
Can anyone do pull request with this. I can confirm that changing this line is working perfectly. Developer take note on this. This is happening on 1.7.6.5 also note that this also happen in 1.7.7-beta1. Using PHP-FPM, nginx_apache. Tried both PHP 7.2 and 7.3
Same error here:
Fatal error: Uncaught Error: Class 'Tools' not found in /data/www/presta.local/html/classes/db/Db.php:794 Stack trace: #0 /data/www/presta.local/html/config/alias.php(47): DbCore->escape('configuration', false) #1 /data/www/presta.local/html/config/alias.php(52): pSQL('configuration') #2 /data/www/presta.local/html/classes/Configuration.php(155): bqSQL('configuration') #3 /data/www/presta.local/html/classes/Configuration.php(209): ConfigurationCore::loadConfiguration() #4 /data/www/presta.local/html/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...') #5 /data/www/presta.local/html/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex() #6 [internal function]: PrestaShopAutoload->load('Tools') #7 /data/www/presta.local/html/config/config.inc.php(85): spl_autoload_call('Tools') #8 /data/www/presta.local/html/admin-dev/index.php(40): require('/data/www/apike...') #9 {main} thrown in /data/www/presta.local/html/classes/db/Db.php on line 794
PHP: 7.2.33-FPM
Nginx: 1.19.2
Presta: 1.7.6.7
For people using Plesk, this is the solution for your problem.
Disable PHP-FPM and set FastCGI instead in PHP Settings.
Memcached and php-fpm can't work together on prestashop.
After switching to FastCGI issue was gone.
This work for me.
Disable PHP-FPM and set FastCGI instead in PHP Settings.
This is NOT SOLUTION !!! PHP-FPM is faster than FastCGI
Hi everybody, just wanted to give some infos on this:
This github issue is closed because we have not been able to find a clear and _reproducible way_ to see the issue. Since so many people have the problem it's clear _there is a problem_. But until we find the very exact combination of settings needed to reproduce it (= I can launch it and run it) we can do nothing about that. "It does not work on my server" is not helpful: I cannot debug it on your server 馃槄 .
We have tried multiple times to reproduce issue using the various environments settings mentioned, we dont see it. So it must be a specific combination, maybe related to a hosting provider. PHP-FPM works with PrestaShop in most situations.
If you want this issue to be reopened we need to have a _reproducible way_ to see the issue. For example a docker image would be awesome because we can just run it and see the issue (or find out what is wrong in the image).
Hi everybody, just wanted to give some infos on this:
This github issue is closed because we have not been able to find a clear and _reproducible way_ to see the issue. Since so many people have the problem it's clear _there is a problem_. But until we find the very exact combination of settings needed to reproduce it (= I can launch it and run it) we can do nothing about that. "It does not work on my server" is not helpful: I cannot debug it on your server 馃槄 .
We have tried multiple times to reproduce issue using the various environments settings mentioned, we dont see it. So it must be a specific combination, maybe related to a hosting provider. PHP-FPM works with PrestaShop in most situations.
If you want this issue to be reopened we need to have a _reproducible way_ to see the issue. For example a docker image would be awesome because we can just run it and see the issue (or find out what is wrong in the image).
We could contribute each one to whom the problem happens. What configuration do you have for PHP-FPM in your hosting. The problem may be there.
I have own server. Apache + php-fpm (no nginx). I think this bug is not depend on hosting or some php-fpm settings.
[Tue Nov 17 21:08:13.887268 2020] [proxy_fcgi:error] [pid 49070:tid 34386058496] [client 79.133.231.107:50665] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Tools' not found in /usr/local/www/domain.com/www/classes/db/Db.php:794\nStack trace:\n#0 /usr/local/www/domain.com/www/config/alias.php(47): DbCore->escape('configuration', false)\n#1 /usr/local/www/domain.com/www/config/alias.php(52): pSQL('configuration')\n#2 /usr/local/www/domain.com/www/classes/Configuration.php(155): bqSQL('configuration')\n#3 /usr/local/www/domain.com/www/classes/Configuration.php(209): ConfigurationCore::loadConfiguration()\n#4 /usr/local/www/domain.com/www/classes/PrestaShopAutoload.php(171): ConfigurationCore::get('PS_DISABLE_OVER...')\n#5 /usr/local/www/domain.com/www/classes/PrestaShopAutoload.php(130): PrestaShopAutoload->generateIndex()\n#6 [internal function]: PrestaShopAutoload->load('Tools')\n#7 /usr/local/www/domain.com/www/config/config.inc.php(85): spl_autoload_call('Tools')\n#8 /usr/local/www/domain.com/www/admin/index.php(40): require('/usr/local/www/...')\n#9 {main}\n thrown in /usr/local/www/domain.com/www/classes/db/Db.php on line 794', referer: https://domain.com/admin/index.php/configure/advanced/performance/?_token=ffgNlfhNRsHKcbQyTSnsMc0y_p8A6-O7YOFb-mbL-vU
64 Gb RAM
pm = static
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 6
pm.max_spare_servers = 8
Hi everybody, just wanted to give some infos on this:
This github issue is closed because we have not been able to find a clear and _reproducible way_ to see the issue. Since so many people have the problem it's clear _there is a problem_. But until we find the very exact combination of settings needed to reproduce it (= I can launch it and run it) we can do nothing about that. "It does not work on my server" is not helpful: I cannot debug it on your server 馃槄 .
We have tried multiple times to reproduce issue using the various environments settings mentioned, we dont see it. So it must be a specific combination, maybe related to a hosting provider. PHP-FPM works with PrestaShop in most situations.
If you want this issue to be reopened we need to have a _reproducible way_ to see the issue. For example a docker image would be awesome because we can just run it and see the issue (or find out what is wrong in the image).
Have you tried reproducing with Memcached in place too?
Issue not easy to reproduce
PS1.7.X (apache24-mpm_event)+(php-fpm 7.2 or 7.3).
error_reporting = E_ALL
display_errors = On
admin > Advanced Parameters / Performance
Click (Clear Cache) wait
In "Debug mode" section
switch to "Debug mode YES" and click "Save"
switch to "Debug mode NO" and click "Clear Cache"
switch to "Debug mode NO" and click "Save"
click "Clear Cache"
click "Save" into "Smarty" section
click "Save" into "Debug" section
click "Clear Cache"
Got bucket of
[proxy_fcgi:error]Class 'Tools' not found in /classes/db/Db.php:794\nStack trace:\n#0
[proxy_fcgi:error]var/cache/dev/ContainerFd2p4n6/getSecurity_UserValueResolverService.php): failed to open stream: No such file or directory in var/cache/dev/ContainerFd2p4n6/appDevDebugProjectContainer.php:1696
[proxy_fcgi:error]Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorException: Warning: require(/var/cache/dev/ContainerFd2p4n6/getPrestashop_Translation_DatabaseLoaderService.php): failed to open stream: No such file or directory in /var/cache/dev/ContainerFd2p4n6/appDevDebugProjectContainer.php:1696
[proxy_fcgi:error]Got error 'PHP message: PHP Warning: require(/var/cache/prod/ContainerK3uxqpq/getSensioFrameworkExtra_Routing_Loader_AnnotClassService.php): failed to open stream: No such file or directory in /var/cache/prod/ContainerK3uxqpq/appProdProjectContainer.php on line 1621PHP message: PHP Fatal error: require(): Failed opening required '/var/cache/prod/ContainerK3uxqpq/getSensioFrameworkExtra_Routing_Loader_AnnotClassService.php'
[proxy_fcgi:error]Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorException: Warning: require(/var/cache/dev/ContainerFd2p4n6/getPrestashop_Translation_DatabaseLoaderService.php): failed to open stream: No such file or directory in /var/cache/dev/ContainerFd2p4n6/appDevDebugProjectContainer.php:1696
[proxy_fcgi:error]require(/var/cache/prod/ContainerK3uxqpq/getSensioFrameworkExtra_Routing_Loader_AnnotClassService.php): failed to open stream: No such file or directory in /var/cache/prod/ContainerK3uxqpq/appProdProjectContainer.php on line 1621PHP
[proxy_fcgi:error]HP Fatal error: Uncaught Error: Class 'AddressFormat' not found in /classes/Tools.php:3376\nStack trace:\n#0 /classes/db/Db.php(794): ToolsCore::nl2br('configuration')
Most helpful comment
fix with change this line:
line 797 file classes/db/DB.php
change line 796:
$string = strip_tags(Tools::nl2br($string));
with this:
$string = str_replace(array("\r\n", "\r", "\n", AddressFormat::FORMAT_NEW_LINE, PHP_EOL), '
', $string);