Author |
Message |
areamike
New Member
Joined: Nov 03, 2020
Posts: 5
|
Posted:
Wed Nov 04, 2020 7:12 am |
|
Hello,
I really didn't want to have to seek help, but here I am.
Recently my home server crashed. I was then forced to upgrade my Linux OS as well as Apache/MySQL and PHP.
I installed Centos 8 along with:
mysqlnd 7.4.12
Apache/2.4.37
PHP 7.4.12
I was able to upgrade everything and get it back to pretty much working order.
The main issue I am having is with the following:
Admin > Modules. Nothing shows up. Database shows modules as Active etc. and the active modules work throughout the site. I just can't Administer them.
I ran a compare on the old admin/modules/modules.php from 2.40 against the file from 2.5.2 and they appear the same, for the most part.
Everything else under the Admin menu appears to be working. There's also some other glitchy stuff going on with various pages, but I'm trying to work through those. My main concern, at the moment is resolving the issue with Modules administration.
Thank you for any and all help. |
|
|
|
|
neralex
Site Admin
Joined: Aug 22, 2007
Posts: 1774
|
Posted:
Wed Nov 04, 2020 2:54 pm |
|
Hi,
I guess you are using some old 3rd-party-modules and/or some 3rd-party-blocks, which causing some php7-errors. This can interupt some included files and this results very often in a blank page. I would suggest you to run the home-server only locally and not in public for the next steps.
At first disable all modules and blocks in the database, which are not part of the RN252 core-package.
After that you should enable the error-reporting in RN, to display all PHP-errors.
Open config.php and find:
php Code:$display_errors = false;
|
Change it to:
php Code:$display_errors = true;
|
SAVE & CLOSE this file.
Open rnconfig.php and find:
php Code:$error_reporting = ^E_NOTICE;
|
replace it with:
php Code:$error_reporting = E_ALL;
|
and comment-out the next line like this:
php Code://if (defined('E_DEPRECATED')) $error_reporting = $error_reporting^E_DEPRECATED;
|
Some lines below find this:
and change it to:
SAVE & CLOSE this file.
Important: Make sure that the folder: rnlogs exists in your RN-root-directory. Which folder should contain the file: dblog. Make sure this folder and this files is writable. If you are done, then you should the see PHP-errors on the screen and the mysql-errors should be stored in the dblog-file. Do not run the settings in public because you could share sensitive data of your server-structure with everyone. Before you are bringing back this installation in public, you have to revert all the changed lines! You could create a backup of the both files before you start the changes.
And then go to the database and active the 3rd-party-modules/blocks step by step one after another. If you had actived one of them, reload the admin/modules page and check which errors are shown and which mysql-errors are stored in the dblog-file. Maybe we are able to help you, when you posted some of your displayed warnings/errors.
Very often old modules or blocks are interupted in the first lines of code caused by deprecated PHP function-calls or mysql-queries. If you are able to do a fresh install of RN252 without any of your old custom-stuff, then you can compare the module/block-files with this clean installation.
Cheers |
_________________ Github: RavenNuke
|
|
|
|
areamike
|
Posted:
Wed Nov 04, 2020 4:44 pm |
|
Thanks neralex.
I made the changes and ran errors. Looking through the dblog, one single line sticks out like a sore thumb.
November 4, 2020, 5:32 pm File: /var/www/html/db/mysqli.php - Line: 201
Code: 1064 - Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups, inmenu, mod_group FROM nuke_modules ORDER BY title ASC' at line 1
SQL was: SELECT mid, title, custom_title, active, view, groups, inmenu, mod_group FROM nuke_modules ORDER BY title ASC
Interesting. |
|
|
|
|
neralex
|
Posted:
Thu Nov 05, 2020 12:59 am |
|
This query is fine. Did you disabled all modules/blocks in the database before, which are not part of the core-package and did you use the core-files in the admin-section to get this error? It seems like there is the difference in your database. Compare your nuke_modules db-table with the fields of the query. There are the same db-fields inside the db-table as you can see it in the query? |
|
|
|
|
areamike
|
Posted:
Thu Nov 05, 2020 6:32 am |
|
Yes, all blocks and modules were disabled.
Yes, I used only core RavenNuke files for this upgrade. I only added back my theme and images.
I am actually not running any non-core mods or blocks at this time.
Just for giggles, I did a clean install of RavenNnuke on my server. I set up the site as default out-of-the-box. Fresh clean database, no addons etc.
I get the same exact result. No modules show up under Admin > Modules. This is a clean install of RavenNuke, not an upgrade.
This is very much starting to point to a server issue.
Line 201 of /var/www/html/db/mysqli.php was no help. It's just the code for throwing the error.
"Compare your nuke_modules db-table with the fields of the query. There are the same db-fields inside the db-table as you can see it in the query?"
I'm not sure how to do this. May be outside my skill level, but I am a quick learner.
Thank you for all your help, neralex!
EDIT:
Looks like this line in /admin/modules/modules.php might be the query
Code:$result3 = $db->sql_query('SELECT mid, title, custom_title, active, view, groups, inmenu, mod_group FROM ' . $prefix . '_modules ORDER BY title ASC');// RN 1489
|
Also, these are the errors on my clean install of RavenNuke
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1429
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1430
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1431
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1432
Lastly, the error in dblogs comes up when I click Admin/Modules:
Code: 1064 - Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups, inmenu, mod_group FROM nuke_modules ORDER BY title ASC' at line 1
SQL was: SELECT mid, title, custom_title, active, view, groups, inmenu, mod_group FROM nuke_modules ORDER BY title ASC |
|
|
|
|
areamike
|
Posted:
Thu Nov 05, 2020 11:41 am |
|
This is how I was able to "fix" it.
admin/modules/modules.php
Line 137
Code: $result3 = $db->sql_query('SELECT mid, title, custom_title, active, view, groups, inmenu, mod_group FROM ' . $prefix . '_modules ORDER BY title ASC');// RN 1489
|
I removed , groups
I then commented out Line 144
I don't know why but it does not like the groups column in the nuke_modules table. |
|
|
|
|
neralex
|
Posted:
Thu Nov 05, 2020 2:12 pm |
|
areamike, I don't get this mysql-error on the admin/modules section with PHP 7.4.12 and what you posted is not fixing the real issue because you need the original query with all fields in this file. It seems while your clean-installation something went wrong. In the following screenshot you can see the correct structure of the database-table: nuke_modules. Please check with phpmyadmin the database-table of your installation. Maybe some of those fields like groups are missing in your database-table. |
Description: |
|
Filesize: |
54.39 KB |
Viewed: |
3360 Time(s) |
|
Last edited by neralex on Fri Nov 06, 2020 12:07 am; edited 4 times in total |
|
|
|
neralex
|
Posted:
Thu Nov 05, 2020 2:19 pm |
|
areamike wrote: | Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1429
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1430
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1431
Notice: Trying to access array offset on value of type null in /var/www/html/nuke/mainfile.php on line 1432 |
This notices should be fixed with the changes in this commit:
[ Only registered users can see links on this board! Get registered or login! ]
Download the core-package again from the master-branch on Github, replace the mainfile.php and let me know, when the notices are not gone.
[ Only registered users can see links on this board! Get registered or login! ] |
|
|
|
|
areamike
|
Posted:
Fri Nov 06, 2020 6:44 am |
|
Hi neralex.
Hence the quotes around "fix"
My table structure for nuke_modules is exactly like your screenshot.
The table structure for nuke_modules on the fresh install I did is the same as your screenshot as well.
Screenshot of nuke_modules table after clean install of RavenNuke
I'll attempt another fresh install of RavenNuke.
Also, I replaced mainfile.php from a fresh download and those errors disappeared.
Thank you,
Mike |
|
|
|
|
|