You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2014-06-30 19:43:16

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Fatal error accessing suppliers tabs

Hello,

I have recently notice that I cannot access some of my suppliers data. When I select Management->Suppliers everything seems fine.
GLPI_suppliers1.png

But when I click on some of them I get:
Fatal error: Call to a member function fetch_assoc() on a non-object in /var/www/glpi/inc/dbmysql.class.php on line 298
GLPI_suppliers2.png
Line 298 is:

                : $result->fetch_assoc());

  /**
    * Fetch assoc of the next row of a Mysql query
    *
    * @param $result MySQL result handler
    *
    * @return result associative array
   **/
   function fetch_assoc($result) {

      return (Toolbox::get_magic_quotes_runtime()
                  ? Toolbox::stripslashes_deep($result->fetch_assoc())
                 : $result->fetch_assoc());
   }

This is an apache error and this is how is shown in apache logs:

[Mon Jun 30 19:37:33 2014] [error] [client X.X.X.X] PHP Fatal error:  Call to a member function fetch_assoc() on a non-object in /var/www/glpi/inc/dbmysql.class.php on line 298, referer: https://glpi.domain.tld/front/supplier.php

But I don't have enough knowledge of PHP to understand this. Anyone?

Server info:
GLPI 0.84.6
Debian Wheezy 3.2.0-4-amd64
Apache/2.2.22
PHP 5.4.4-14+deb7u11
MySQL 5.5.37-0+wheezy1

Offline

#2 2014-07-02 14:51:51

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Fatal error accessing suppliers tabs

Using mode debug could you see if you have SQL errors and give us the SQL request in error.
You could also find them on sql-errors.log


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2014-07-02 18:02:47

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Re: Fatal error accessing suppliers tabs

Thanks for answering MoYo.

No SQL is shown in debug mode. The screenshot showing apache error is in debug mode.

I guess the first error is the one but as glpi_suppliers table is involved I've added another one:

2014-07-02 17:54:20
*** MySQL query error:
***
SQL: SELECT COUNT(*) AS cpt
             FROM `glpi_plugin_domains_domains` WHERE `glpi_suppliers`=\'16\'
                                                AND entities_id NOT IN (\'0\')
Error: Unknown column 'glpi_suppliers' in 'where clause'
Backtrace :
/var/www/glpi/inc/db.function.php :328             DBmysql->query()
/var/www/glpi/inc/commondbtm.class.php :1697               countElementsInT             able()
/var/www/glpi/inc/commondbtm.class.php :2098               CommonDBTM->canU             nrecurs()
/var/www/glpi/inc/supplier.class.php :114          CommonDBTM->showFormHead             er()
/var/www/glpi/front/supplier.form.php :90          Supplier->showForm()
/var/www/glpi/front/supplier.form.php

2014-07-02 17:55:06
*** MySQL query error:
***
SQL: SELECT COUNT(*) AS cpt
             FROM `glpi_plugin_domains_domains` WHERE `glpi_suppliers`=\'16\'
                                                AND entities_id NOT IN (\'0\')
Error: Unknown column 'glpi_suppliers' in 'where clause'
Backtrace :
/var/www/glpi/inc/db.function.php :328             DBmysql->query()
/var/www/glpi/inc/commondbtm.class.php :1697               countElementsInT             able()
/var/www/glpi/inc/commondbtm.class.php :2098               CommonDBTM->canU             nrecurs()
/var/www/glpi/inc/supplier.class.php :114          CommonDBTM->showFormHead             er()
/var/www/glpi/front/supplier.form.php :90          Supplier->showForm()
/var/www/glpi/front/supplier.form.php

Could be these "&nbsp", but how did they get there?

Offline

#4 2014-07-02 18:11:59

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Fatal error accessing suppliers tabs

disable the plugin domain. It is the cause of your problem.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#5 2014-07-24 19:54:31

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Re: Fatal error accessing suppliers tabs

Sorry, about the delay.
Is there any workaround?. I really like to manage my domains with the plugin.

Thank you

Offline

#6 2014-07-25 09:52:48

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Fatal error accessing suppliers tabs

You must write to the leader of this plugin and give him the SQL error to be corrected.


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2014-07-29 11:10:01

makeijan
Member
From: Pontevedra, Galicia
Registered: 2008-01-29
Posts: 774
Website

Re: Fatal error accessing suppliers tabs

Just in case someone is having the same issue I've found a solution here:
http://www.glpi-project.org/forum/viewt … p?id=35099

I've already reported to Plugin Developer.

Thanks

Offline

Board footer

Powered by FluxBB