Msaustral Posted May 8, 2019 Share Posted May 8, 2019 Hi I create a new post as the one that is on the forum is from 2017 problem: [Mon May 06 15:42:29.001228 2019] [proxy_fcgi:error] [pid 20020] [client 127.0.0.1:33532] AH01071: Got error 'PHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n' [Mon May 06 15:38:11.556735 2019] [proxy_fcgi:error] [pid 19901] [client 127.0.0.1:33332] AH01071: Got error 'PHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n', referer: https://domain/admin-dir/index.php?controller=AdminModules&token=1b282cf70da3757bec718b32b59d4338&configure=ps_facetedsearch&tab_module=front_office_features&module_name=ps_facetedsearch [Wed May 08 12:13:07.482461 2019] [proxy_fcgi:error] [pid 19396:tid 140350068848384] [client x.x.x.x:44736] AH01071: Got error 'PHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n' [Wed May 08 12:13:32.898469 2019] [proxy_fcgi:error] [pid 19396:tid 140350052062976] [client x.x.x.x:59428] AH01071: Got error 'PHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\nPHP message: PHP Warning: Cannot use a scalar value as an array in /opt/bitnami/apache2/htdocs/domain/classes/cache/Cache.php on line 463\n' is prestashop 1.7.5.1, this is going off since we activate PHP-FPM Link to comment Share on other sites More sharing options...
Msaustral Posted May 10, 2019 Author Share Posted May 10, 2019 Hi anyone? Link to comment Share on other sites More sharing options...
Janett Posted May 10, 2019 Share Posted May 10, 2019 What did you use as cache option in Advanced parameters > Performances ? Link to comment Share on other sites More sharing options...
Msaustral Posted May 10, 2019 Author Share Posted May 10, 2019 Hi thank you for your reply, this is my config: Link to comment Share on other sites More sharing options...
Janett Posted May 11, 2019 Share Posted May 11, 2019 Try to delete all cache content in folder /var/cache/ (all folders and files inside) Then clear cache in Advanced parameters > Performances to clear all others cache. If errors reappear, try to disabled last cache option (APC) entirely 1 Link to comment Share on other sites More sharing options...
Msaustral Posted May 13, 2019 Author Share Posted May 13, 2019 Hi disabling APC the error disappear, I can't use APC? Link to comment Share on other sites More sharing options...
Janett Posted May 13, 2019 Share Posted May 13, 2019 You need to find what’s wrong with usage of cache. It can be a bug in Prestashop or a bug of one module who made bad usage of cache. We to retrieve more info of your error messages and your logs. Link to comment Share on other sites More sharing options...
Msaustral Posted May 14, 2019 Author Share Posted May 14, 2019 how can i help? Link to comment Share on other sites More sharing options...
Msaustral Posted May 14, 2019 Author Share Posted May 14, 2019 HI, also I did report a bug by this post below, it is the right way to report it? Link to comment Share on other sites More sharing options...
viliera Posted January 23, 2020 Share Posted January 23, 2020 Hi, could you solve it? I have the same problem. Thank you. Link to comment Share on other sites More sharing options...
Msaustral Posted January 23, 2020 Author Share Posted January 23, 2020 Hi yes but do not remember what exactly was causing it. what php version do you have? apache or nginx? prestashop version? did you do any modifications to any module? 1 Link to comment Share on other sites More sharing options...
viliera Posted January 27, 2020 Share Posted January 27, 2020 Hola, Gracias por responder. Es Apache en mi caso, Prestashop 1.7.6.2 PHP 7.2.26 FastCGI Tengo un modulo que me genera R_TOO_MANY_REDIRECTS en el enlace de CRON. Pero esto si activo el CacheAPC, Si lo desactivo todo en orden. Saludos. 1 Link to comment Share on other sites More sharing options...
Msaustral Posted January 27, 2020 Author Share Posted January 27, 2020 hola, cambia a APCU, APC tengo entendido que dejó de ser usado. https://wordpress.stackexchange.com/questions/174317/caching-apc-vs-apcu-vs-opcache Link to comment Share on other sites More sharing options...
viliera Posted January 27, 2020 Share Posted January 27, 2020 Es APCu, y lo mismo ocurre con Memcached. No encuentro la solución. Link to comment Share on other sites More sharing options...
George441 Posted January 27, 2020 Share Posted January 27, 2020 I had the same problem but i solved this by clearing all caches. Please follow @Janett comment it will help you how to clear caches. Link to comment Share on other sites More sharing options...
Msaustral Posted January 27, 2020 Author Share Posted January 27, 2020 hi try to erase manually all file from _PS_Path\var\cache 2 Link to comment Share on other sites More sharing options...
viliera Posted January 29, 2020 Share Posted January 29, 2020 Hi, I've already done it many times. Link to comment Share on other sites More sharing options...
George441 Posted January 29, 2020 Share Posted January 29, 2020 5 hours ago, viliera said: Hi, I've already done it many times. Do you still face this problem? 1 Link to comment Share on other sites More sharing options...
viliera Posted January 30, 2020 Share Posted January 30, 2020 Hi, I still have this problem. The following error is constantly recorded in the log. (In plesk) Warning (MY IP) mod_fcgid: stderr: PHP Warning: Cannot use a scalar value as an array in /var/www/vhosts/ MY DOMAIN /httpdocs/classes/cache/Cache.php on line 463 In cache.php 463 there is the following code: if (isset($this->sql_tables_cached[$table][$key])) { $this->sql_tables_cached[$table][$key]['count'] += $count; $changedTables[$table] = true; } } } } What can be? 😕 Thank you. Regards Link to comment Share on other sites More sharing options...
JBW Posted January 31, 2020 Share Posted January 31, 2020 On 1/30/2020 at 1:07 AM, viliera said: What can be? Sounds like you are using PHP 7.4.!? Prestashop is only compatible until 7.2., you need to downgrade Link to comment Share on other sites More sharing options...
viliera Posted January 31, 2020 Share Posted January 31, 2020 2 hours ago, JBW said: Parece que estás usando PHP 7.4.!? Prestashop solo es compatible hasta 7.2., Necesita degradar Hi, I am using PHP 7.2 Thanks Regards Link to comment Share on other sites More sharing options...
JBW Posted January 31, 2020 Share Posted January 31, 2020 Ah ok I see it's only a warning, I read somewhere in 7.4. this will result in an error. Anyway it should not be visible as long debug is switched off, is there anything affected in the functionality? 1 Link to comment Share on other sites More sharing options...
remyyyyy Posted September 15, 2021 Share Posted September 15, 2021 Hello, If you have this error : "PHP Warning: Cannot use a scalar value as an array in classes/cache/Cache.php on line 463" then you can replace this : if (isset($this->sql_tables_cached[$table][$key])) { with this : if (isset($this->sql_tables_cached[$table][$key]) && is_array($this->sql_tables_cached[$table][$key])) { Regards Link to comment Share on other sites More sharing options...
ilisiaraul Posted December 13, 2021 Share Posted December 13, 2021 (edited) I have deactivated APCU in select php version(cPanel) and activated back and it works again. Edited December 13, 2021 by ilisiaraul (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now