Exception - Cannot login to Administration

Robert Faulkner Posted in Technical Support 7 years ago

Hi, I have just installed on my computer locally using Wamp. Frontend is working perfectly, but I cannot access the backend administration. I receive the following error which looks to be an issue with DATE format I think....

**exception 'OssnDatabaseException' with message 'Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'theclub_db.ossn_users.time_created' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by SELECT DATE_FORMAT(FROM_UNIXTIME(time_created), '%Y') AS year, DATE_FORMAT(FROM_UNIXTIME(time_created) , '%m') AS month, COUNT(guid) AS total FROM ossn_users WHERE(time_created > 0) GROUP by DATE_FORMAT(FROM_UNIXTIME(time_created) , '%Y%m') ; ' in C:wampwwwTheClubclassesOssnDatabase.php:77 Stack trace: #0 C:wampwwwTheClubclassesOssnDatabase.php(175): OssnDatabase->execute() #1 C:wampwwwTheClubclassesOssnUser.php(950): OssnDatabase->select(Array, true) #2 C:wampwwwTheClubsystempluginsdefaultjavascriptsdynamicadmindashboardusersusers.php(13): OssnUser->countByYearMonth() #3 C:wampwwwTheClublibrariesossn.lib.views.php(27): include('C:\wamp\www\The...') #4 C:wampwwwTheClublibrariesossn.lib.views.php(50): ossn_include('C:/wamp/www/The...', Array) #5 C:wampwwwTheClublibrariesossn.lib.plugins.php(75): ossn_view('system/plugins/...', Array) #6 C:wampwwwTheClubsystempluginsdefaultpagesadministratorcontentsdashboard.php(156): ossn_plugin_view('javascripts/dyn...') #7 C:wampwwwTheClublibrariesossn.lib.views.php(27): include('C:\wamp\www\The...') #8 C:wampwwwTheClublibrariesossn.lib.views.php(50): ossn_include('C:/wamp/www/The...', Array) #9 C:wampwwwTheClublibrariesossn.lib.plugins.php(75): ossn_view('system/plugins/...', Array) #10 C:wampwwwTheClublibrariesossn.lib.admin.php(204): ossn_plugin_view('pages/administr...') #11 [internal function]: ossn_administrator_pagehandler(Array, 'administrator') #12 C:wampwwwTheClublibrariesossn.lib.page.php(67): call_user_func('ossn_administra...', Array, 'administrator') #13 C:wampwwwTheClubindex.php(21): ossn_load_page('administrator', false) #14 {main}**
Replies
Indonesian Arsalan Shah Replied 7 years ago

It seems you are using MYSQL 5.7 ? Please try to run following query from root account :

 SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
German Michael Zülsdorff Replied 7 years ago

Your latest issue is a PHP 7.1 incompatibility which has been fixed already in the development branch and comes included with the next update.

You may either use an older PHP (eg. 5.6) or apply the fix manually according to:

https://github.com/opensource-socialnetwork/opensource-socialnetwork/commit/7e3e9e1920812247f5a1d2d4f04b641c88067ff9

(remove the read lines and add the green ones , without +/- in the beginning)

gb Robert Faulkner Replied 7 years ago

OK Zet, thanks... I'll try your suggestions.

German Michael Zülsdorff Replied 7 years ago

Please note that Windows systems are not supported, and try to use the forum search first, before opening a new thread.

See:
https://www.opensource-socialnetwork.org/discussion/view/1994/error-when-going-to-administrator-page

and:
https://www.opensource-socialnetwork.org/wiki/view/706/how-to-install-open-source-social-network

gb Robert Faulkner Replied 7 years ago

So that work... Great! But now I have a similar error at the frontend, can't access the site now haha ffs!

**Error: [] operator not supported for strings in C:\xampp\htdocs\TheClub\components\OssnWall\classes\OssnWall.php:345 Stack trace: #0 C:\xampp\htdocs\TheClub\components\OssnWall\plugins\default\wall\siteactivity.php(19): OssnWall->getAllPosts(Array) #1 C:\xampp\htdocs\TheClub\libraries\ossn.lib.views.php(27): include('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\TheClub\libraries\ossn.lib.views.php(50): ossn_include('C:/xampp/htdocs...', Array) #3 C:\xampp\htdocs\TheClub\libraries\ossn.lib.plugins.php(75): ossn_view('C:/xampp/htdocs...', Array) #4 C:\xampp\htdocs\TheClub\components\OssnWall\plugins\default\wall\pages\wall.php(27): ossn_plugin_view('wall/siteactivi...') #5 C:\xampp\htdocs\TheClub\libraries\ossn.lib.views.php(27): include('C:\\xampp\\htdocs...') #6 C:\xampp\htdocs\TheClub\libraries\ossn.lib.views.php(50): ossn_include('C:/xampp/htdocs...', Array) #7 C:\xampp\htdocs\TheClub\libraries\ossn.lib.plugins.php(75): ossn_view('C:/xampp/htdocs...', Array) #8 C:\xampp\htdocs\TheClub\libraries\ossn.lib.initialize.php(121): ossn_plugin_view('wall/pages/wall') #9 C:\xampp\htdocs\TheClub\libraries\ossn.lib.page.php(67): ossn_user_pagehandler(Array, 'home') #10 C:\xampp\htdocs\TheClub\index.php(21): ossn_load_page('home', Array) #11 {main}**
gb Robert Faulkner Replied 7 years ago

OK, thanks Malik... I'll try that now.