Is there is a who is online mod compliant with EM?

Wondering why that MOD you have won't install correctly? Let's take a look
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
User avatar
sergefa
Posts: 39
Joined: Fri Jul 14, 2006 8:22 pm
Location: Krymsk, Krasnodarsky Kray, Russia
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by sergefa »

I got to the 2 of the 3 steps and got MySql error message
SQL PROCESSING HALTED

An error was encountered while processing the SQL commands. Further SQL processing has been halted. You may choose to complete the MOD installation anyway and perform the SQL commands manually yourself. However, at this point EM cannot guarantee the MOD will work correctly so you are best off seeking support from the Author before continuing further.

The failed line was:
ALTER TABLE phpbb_themes ADD online_color VARCHAR(6) NOT NULL DEFAULT '008500';;


SQL ERROR: 1060
Duplicate column name 'online_color'

The following SQL was attempted: Allow
ALTER TABLE phpbb_themes ADD online_color VARCHAR(6) NOT NULL DEFAULT '008500';;
FAILED
ALTER TABLE phpbb_themes ADD offline_color VARCHAR(6) NOT NULL DEFAULT 'DF0000';;
Not Attempted
ALTER TABLE phpbb_themes ADD hidden_color VARCHAR(6) NOT NULL DEFAULT 'EBD400';;
Not Attempted
INSERT INTO phpbb_config(config_name,config_value) VALUES('online_time','60');;
Not Attempted
Beauty is in the eye of the beer holder
My site:http://www.russianhunting.narod.ru
My phpBB 2 forum: http://krymsk.net/forum/index.php

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by Nightrider »

You might want to check your database and see if all of these fields have been added to your phpbb_theme table and the record added to your phpbb_config table. Either you have updated your database for this MOD once before or you have added another MOD that added an identical field name. Chances are, you have already updated your database and can continue with the install...

Image

User avatar
sergefa
Posts: 39
Joined: Fri Jul 14, 2006 8:22 pm
Location: Krymsk, Krasnodarsky Kray, Russia
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by sergefa »

Well, I found the mentioned fields in the database, but I couldn't make out if the the record VALUES('online_time','60');; was added to my phpbb_config table. I tried to download the dump in the phpMyAdmin to my computer so I could see but the downloading didn'k work for nuknown to me reason so I deal with this problem .
The mod is not installed, right? So it can wait till I find out about the mentioned phpbb_config table field.
Beauty is in the eye of the beer holder
My site:http://www.russianhunting.narod.ru
My phpBB 2 forum: http://krymsk.net/forum/index.php

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by Nightrider »

If the other 3 fields have already been added to your phpbb_theme table, it's probably safe to assume that the record has also been added to the phpbb_config table. Go ahead and finish with the MOD install and see what happens. If for any reason, it messes things up, you can quickly and easily restore the EM Backups to get things back to normal until you can figure out what went wrong and a way to correct the problem. I don't anticipate that you will have a problem with it though...

You can also uncheck all the SQL queries except for the one for the phpbb_config table. If the record already exists, EM will tell you that the SQL query failed, which would be what we would expect if the record already exists. Then just complete the MOD install...

Image

User avatar
sergefa
Posts: 39
Joined: Fri Jul 14, 2006 8:22 pm
Location: Krymsk, Krasnodarsky Kray, Russia
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by sergefa »

Well. I did as you suggested and unchecked 3 boxes but against my expectations INSERTing INTO phpbb_configphpbb_themes ADD online_color VARCHAR(6) NOT NULL DEFAULT '008500' was Success
Now I am goping to see what happens if something goes wrong I'll have to restore backups
I have one more question. I am going to install Categories hierarchy - 2.1.0 Mod. The author strongly recommends to create backups of files before "going blindly with easyMOD". But the EM creates backups so what is the point doing the double job. I would like to know your opinion about this mod
Thank you
Beauty is in the eye of the beer holder
My site:http://www.russianhunting.narod.ru
My phpBB 2 forum: http://krymsk.net/forum/index.php

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by Nightrider »

If you really want to know my opinion about the Categories Hierarchy MOD, this is it. I would strongly suggest you avoid it like the plague. It modifies so much of your phpBB code, that it limits the number of other MODs that you can install. The CH MOD pretty much hijacks the phpBB code and makes it so you are limited to what you can do to your own forum...

If you read the MOD instructions, you will quickly see what I mean. Ptirhiik advises you to rename a large number of phpBB files, so that they will no longer be of any use. Basically they can be removed from your board once this MOD is installed because they will not be used again...

If you want to have the ability and flexibility to install almost any MOD into your forum, you should completely avoid the CH MOD...

Image

User avatar
sergefa
Posts: 39
Joined: Fri Jul 14, 2006 8:22 pm
Location: Krymsk, Krasnodarsky Kray, Russia
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by sergefa »

Thank you. Even though I am not much of expert I got a very funny misgivings when I saw the code of the install file. I was thinking of a ability to have subforums but there is n simpler alternative subforum mod.
Thank you. You really greatly helped me.
All the best
Beauty is in the eye of the beer holder
My site:http://www.russianhunting.narod.ru
My phpBB 2 forum: http://krymsk.net/forum/index.php

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by Nightrider »

You are welcome. I hope I saved you from a lot of headaches in the future. If you want, you can install the Simple Subforums MOD. It is a PITA to install, but it doesn't hijack your forum...

Image

User avatar
sergefa
Posts: 39
Joined: Fri Jul 14, 2006 8:22 pm
Location: Krymsk, Krasnodarsky Kray, Russia
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by sergefa »

Hallo again, Nightrider!
When istalling Who is online add-on I got the message:
$sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_topic, s.session_ip
I looked in my viewonline.php. There is no s.session_topic, there. It means such a field is missing, right? Was it removed by previous mods? I looked in the newly installed local forum only with few mods. This s.session_topic line is also missing there. Is it safe replace in my foeum's line with the mod's line in the mod install file? Do I have to remove s.session_topic line in the mod's replace with line as well?
One more thing seems strange to me. Following toyr advice (HOPEFULLY i GOT IT RIGHT) I reduced the above mentioned line to SELECT u.user_id but the EM still can't see it.
The following thing happened to me when insrstalling the EM friendly SimleSubforum mod. I got the message:
Critical Error
FIND FAILED: In file [index.php] could not find:
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);

I checked the both lines are there and found
while ($row = $db->sql_fetchrow($result))
{
$category_rows[] = $row;
}
$db->sql_freeresult($result);

I replaced the both original lines with last ones and proceeded. Was it a right thing to do? As you are probably sleeping I can safely proceed because anywatthe EM creates backups and Ican redo everything except for the mysql ALTER TABLE phpbb_forums ADD forum_parent INTEGER NOT NULL DEFAULT 0;
which is not dangeruos and can be left as it is. Or am I mistaken. Then I'll have to mlearn how rollback the mysql ADD forum_parent command

My next question is about security issue. I ahve already installed about 30 mods with EM and I had installed several mods before . Does is constitutes a serious security risk? Does the forum becomes more vulnerable with so many mods?. And as I understood upgrading to next version (in my case from phphBB 2020 to 2021) becomes more problematic.
I hope I don't overload you with my questions. If I do skip the last ones
Beauty is in the eye of the beer holder
My site:http://www.russianhunting.narod.ru
My phpBB 2 forum: http://krymsk.net/forum/index.php

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Is there is a who is online mod compliant with EM?

Post by Nightrider »

sergefa wrote: When istalling Who is online add-on I got the message:
$sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_topic, s.session_ip
I looked in my viewonline.php. There is no s.session_topic, there. It means such a field is missing, right? Was it removed by previous mods? I looked in the newly installed local forum only with few mods. This s.session_topic line is also missing there. Is it safe replace in my foeum's line with the mod's line in the mod install file? Do I have to remove s.session_topic line in the mod's replace with line as well?

Could you provide a download link to the Who is online add-on MOD and a text link to your viewonline.php file???
sergefa wrote: The following thing happened to me when insrstalling the EM friendly SimleSubforum mod. I got the message:
Critical Error
FIND FAILED: In file [index.php] could not find:
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);

I checked the both lines are there and found
while ($row = $db->sql_fetchrow($result))
{
$category_rows[] = $row;
}
$db->sql_freeresult($result);

I replaced the both original lines with last ones and proceeded. Was it a right thing to do?

For whatever reason, the phpBB developers replaced this elegant while loop with code that works exactly the same and doesn't fix a thing in one of the updates. Why they did that is anyone's guess, but it wasn't necessary. As a result, it causes problems like you saw with MODs designed to look for the older more elegant approach. I suspect that one of the developers couldn't understand the code, so (s)he changed it so that (s)he could understand it better. It wasn't necessary though...

So in your FIND statement, you can change it to find the following, which it appears that you did. You included the while statement too, which is fine, but not necessary...

Code: Select all

$category_rows[] = $row;
}
$db->sql_freeresult($result);
sergefa wrote: My next question is about security issue. I ahve already installed about 30 mods with EM and I had installed several mods before . Does is constitutes a serious security risk? Does the forum becomes more vulnerable with so many mods?. And as I understood upgrading to next version (in my case from phphBB 2020 to 2021) becomes more problematic.

Adding MODs to your forum is not a seurity risk unless the MODs introduce security flaws, which is possible. So you are at the mercy of the MOD author. Hopefully most know what they are doing and few add or modify code that could put your forum at risk...

The best thing to do to protect yourself is to maintain good database and phpBB file backups. Should the worst ever occur, with good backups, you could recover from anything in a short amount of time. For someone to exploit a security hole in your code, they need to know that it exists. So if the hole was introduced by a MOD, they would have to know that the MOD was installed and that it contained a security flaw. I don't think you have much to worry about...

Image

Locked