Hello,
I am unable to view this page http://inventory.jinharsh.co.in/admin/products/view/211
None of the product pages get loaded and also when we click on the product while on List Products Page, it keeps on getting loading sign. Below is the error when i try to view product in new tab.
An uncaught Exception was encountered
Type: Error
Message: Call to a member function num_rows() on boolean
Filename: /var/www/sitename.co.in/2019inventory/app/models/admin/Products_model.php
Line Number: 367
Backtrace:
File: /var/www/sitename.co.in/2019inventory/app/controllers/admin/Products.php
Line: 2387
Function: getAllWarehousesWithPQ
File: /var/www/sitename.co.in/2019inventory/index.php
Line: 273
Function: require_once
- MSAnswered
Please check server requirements in the documentation.pdf specially MySQL modes.
- MVAnswered
This was working till 2 days back. The only thing changed was i had restarted the server and then it started showing error. I have checked again.
Thanks
- MVAnswered
Hey sorry it put the only_full_by again by itself. I have disabled it now.
- MSAnswered
You can disable the MySQL mode permanently by adding to your config file so that the restart won’t enable them back.
# Get modes SELECT @@sql_mode; # Disable ONLY_FULL_GROUP_BY SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); # Disable NO_ZERO_DATE & NO_ZERO_IN_DATE SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_DATE','')); SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_IN_DATE',''));
Permanently changing SQL mode
First, you can find out which configuration file our MySQL installation prefers.
mysql --verbose --help | grep -A 1 "Default options"
will result in something like this
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
You can copy result of
SELECT @@sql_mode;
to your my.ini file and remove the modes you want to disable.[mysqld] # ... other stuff will probably be here sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Save, exit, and restart MySQL
sudo service mysql restart
- Login to Reply