You are not logged in.
Pages: 1
Hello,
I have recently notice that I cannot access some of my suppliers data. When I select Management->Suppliers everything seems fine.
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
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
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
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 " ", but how did they get there?
Offline
disable the plugin domain. It is the cause of your problem.
MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI : Support Contribute References Freshmeat
Offline
Sorry, about the delay.
Is there any workaround?. I really like to manage my domains with the plugin.
Thank you
Offline
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
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
Pages: 1