Jump to content

Call to a member function rowCount() on a non-object ... /DbPDO.php on line 198


Recommended Posts

Hello,

 

since (07/04/2015) the upgrade from 1.6.0.11 to 1.6.1.0 I have the following fatal error PHP from my Apache log on the server: 

PHP Fatal error: Call to a member function rowCount() on a non-object in /var/www/htdocs/my-solution/public/classes/db/DbPDO.php on line 198, referer: http://www.nature-sens.com/soins-du-corps/245-lait-vegetal-hydratant-bio.html

I have no idea about ! I am not a developer.

Anybody could help ?

Thank you.

Frank.

Link to comment
Share on other sites

  • 2 months later...

Hi

I have a same problem on my shop https://www.infovalis.com/

 

Fatal error: Call to a member function rowCount() on a non-object in /***/***/***/infovalis.com/httpdocs/classes/db/DbPDO.php on line 206

 

when I want to print invoice


Hi

I have a same problem on my shop https://www.infovalis.com/

 

Fatal error: Call to a member function rowCount() on a non-object in /***/***/***/infovalis.com/httpdocs/classes/db/DbPDO.php on line 206

 

when I want to print invoice

 

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

It happens to me too, every time I save data (Prestashop 1.6.1.4 running in WAMP with PHP 5.5.12).
I've fixed the problem changing the file classes/SmartyCustom.php on line 297:
 

Db::getInstance()->execute($sql, false);
return true; //It prevents execution of problematic code

return Db::getInstance()->Affected_Rows();

Isn't elegant, but it's working :)

Edited by carlos.creados (see edit history)
  • Like 1
Link to comment
Share on other sites

Sounds like you are abusing of a fix for something that is not having any bug at all.

If you have to apply such a fix, it means the underlying query blows-up.

 

Most probable cause your table ps_smarty_lazy_cache does not exists or is totally corrupted.

 

Fix THE TABLE and return the code to the original.

Link to comment
Share on other sites

  • 4 months later...

Bonjour

 

 

Je suis sous la version 1.61.6  Hébergé chez LWS et je retrouve régulièrement ce message dans les log Serveur:

 

[Fri Jun 24 15:16:56.813016 2016] [:error] [pid 27544] [client 82.127.208.193:46397] FastCGI: server "/var/www/clients/client1/web8/cgi-bin/php5-fcgi-*-80-lingerie-miss-femme-fatale.com" stderr: PHP message: PHP Fatal error: Call to a member function rowCount() on a non-object in /var/www/clients/client1/web8/web/classes/db/DbPDO.php on line 208, referer: (Url fiche produits exemple:) http://www.lingerie-miss-femme-fatale.com/271-chaussures  mais qui concerne d'autre url produits de façon aléatoire et non fixe ..

Cette erreur semble empêcher la ou les pages concernées  de se charger et   sont déclarée  "inaccessible pour l'instant " ...! 

 

quelqu'un peut'il m'aider 

 

Par avance Merci

 

J.Perrin

Link to comment
Share on other sites

Soit ta base de données est corrompue (inconsistante), soit le serveur SQL part en RTT dès qu'il y a un peu de sollicitation (log serveur: "désolé j'ai piscine...") :D

 

 

PS: Il faut abandonner ces hébergeurs à la petite semaine - tout juste bon pour la galerie de photos de vacances de tata Lulu.

Link to comment
Share on other sites

  • 11 months later...

It happens to me too, every time I save data (Prestashop 1.6.1.4 running in WAMP with PHP 5.5.12).

I've fixed the problem changing the file classes/SmartyCustom.php on line 297:

 

Db::getInstance()->execute($sql, false);
return true; //It prevents execution of problematic code

return Db::getInstance()->Affected_Rows();

Isn't elegant, but it's working :)

 

It's more simple, you only have to clear smarty cache, and everything will go right again.

Link to comment
Share on other sites

  • 1 year later...

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...