News:

Wondering if this will always be free?  See why free is better.

Main Menu

mod_security problem?

Started by Sir Osis of Liver, March 09, 2019, 04:09:33 PM

Previous topic - Next topic

Sir Osis of Liver

No response in mod support topic, so posting here.  SA Chat will not work on GoDaddy server, chat windows open both ends, messages do not post. Clean 2.0.15 install, clean db, no other mods. No forum or server errors, these errors in chat error log -



INFO  Undefined index: database_error
File: /home/u0fgcfwp0drf/public_html/kotctest/Sources/Subs-Db-mysql.php
Line: 1407

FATAL  Call to undefined function allowedTo()
File: /home/u0fgcfwp0drf/public_html/kotctest/Sources/Subs-Db-mysql.php
Line: 1408



allowedTo() is defined function in Security.php.  Mod had been working, then tanked. Works fine on my server.  Does this look like mod_security glitch?  mod_security is enabled, GD will not disable.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Unlikely to be mod_security; more likely that the database connection failed early in the process (higher load maybe?) and the way SMF handles that at just the wrong time is very ungraceful.

If it were mod_security it wouldn't even get to SMF.

Sir Osis of Liver

Rest of the forum works fine, only problem is chat, it never works.  It's a small forum, wouldn't think it's a load problem, and there's no indication of db disconnect.  Something apparently was changed on the server and it just stopped working.  Why is it reporting undefined function for valid function?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Because at the point in question, Security.php hasn't been loaded yet.

Kindred

Also, you should know better.... we don't support mods.  If there is no answer in the mod thread, bringing it here is still not correct. :P
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

I know, but I'm trying to help a forum owner, and that's kind of what we're here for.  And this doesn't appear to be a problem with mod code, the two files in logged errors are unedited core.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

For an issue to happen this early, it really has to be something basic.
My first suspicion is that it can't load a theme for some reason. 
Is there a custom theme?   Another theme you could try?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Did a clean install, new db, running Curve, installed chat mod, it doesn't work on GoDaddy.  Same install on my server works fine. mod_security is enabled on both, but may be configured differenty.  Everything else on the forum works normally.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Does it work fine without the chat mod?

Same php versions?

I'd compare phpinfo between the two environments looking for clues.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Forum works fine with or without chat mod, it has no effect on anything else.  The mod doesn't edit any core or theme files, it's hooked and has it's own files, appears to run as an external script.  It has it's own error log, the errors I posted are from that log, they are not logged by forum or server.  The forum is oblivious to whatever is borking the mod.  Both are running on linux box in php 5.6 (5.6.36 - 5.6.40), GD is mysql 5.6.39, mine is MariaDB 10.0.16.  No obvious differences that would cause a problem.  Security.php is loaded in index.php and SSI.php, the mod apparently is not seeing it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

drewactual

how are sessions setup in these instances?

Sir Osis of Liver

I've imported the client prod database to my server, so it's running in same environment as my test install, where mod works correctly.  Server settings for cookies and sessions are the same.  Mod installs, works in FF, doesn't work in IE.  Requests 'Login to chat', click on it opens forum login window, but you're still logged in.  It's something in the database, if I connect it to a clean install, install the mod, same result.  Works in FF, not in IE.  >:(
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

drewactual

on both the client computer/server and your own?  what cypher suite are you using? some browsers don't like tsl1.2 at all and will reject that connection altogether.

Sir Osis of Liver

I have three installs currently running on my server:

- My usual 2.0.15 test install, where mod works fine.
- The client forum (full forum backup connected to prod database), where I have the login problem.
- Clean 2.0.15 install connected to prod db, which also has login problem.

Everything's the same, except the db.  This mod was working in client's forum, until this -

"It worked great for the longest time and stopped working after either the Gallery Pro mod or the Classifieds Mod was updated last."

The problem I'm seeing now is not what he originally had.  IIRC, chat windows opened but messages wouldn't post.  It was also logging the allowedTo() errors.  Now it doesn't see member logged in, but only in IE.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

This should not be possible -



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Does installing Gallery Pro & Classifieds reproduce the issue in your test env?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

I cloned the production forum (files and db) onto my server, so the mods are installed.  Have the same problem with clean install connected to prod db.  The only place it works is on clean install with clean db.  The mod adds 5 tables, 20 permissions, 22 settings.  Deleted them all, reinstalled mod, same problem.  It's not seeing the member logged in, but only in IE, works fine in FF.  Tinkered with browser cookie settings, no difference.  Beats me.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

I am asking if you tried to install those mods onto one of your 2.0.15 test environments.  Maybe that'll break it, and that would be good to know... 

The SA Chat support thread includes these same errors reported multiple times, so it's almost certainly an SA Chat issue.  Doesn't look like the mod is actively supported...   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

The problem is in smf_settings.  If I import table from working test install to prod db, chat works in IE. 

These settings work -



('2sichat_mn_heart', '10000'),
('2sichat_mn_heart_timeout', '40000'),
('2sichat_cw_heart', '5000'),
('2sichat_mn_heartmin', '33000'),
('2sichat_live_notfy', '1'),
('2sichat_e_last3min', '1'),
('2sichat_e_last3minv', '180'),
('2sichat_live_type', '0'),
('2sichat_purge', '1'),
('2sichat_gad_lang', 'en'),
('2sichat_gad_trans', '1'),
('2sichat_ico_myspace', '1'),
('2sichat_ico_gplus', '1'),
('2sichat_ico_twit', '1'),
('2sichat_ico_fb', '1'),
('2sichat_ico_adthis', '1'),
('2sichat_board_index', 'everywhere'),
('2sichat_theme', 'default'),
('2sichat_live_online', '1'),
('2sichat_e_logs', '1'),
('2sichat_cookie_name', '2sichat'),
('2sichat_permissions', '0');

('integrate_pre_include', '$sourcedir/Subs-Shoutbox.php,$sourcedir/OharaYTEmbed.php,$boarddir/Sources/SAChatHooks.php'),
('integrate_load_permissions', 'shoutbox_load_permissions,SAChat_load_permissions'),

('integrate_load_theme', 'shoutbox_load_theme,OYTE_css,SAChat_loadTheme'),
('integrate_admin_areas', 'shoutbox_admin_areas,SAChat_admin_areas'),



These do not -



('2sichat_mn_heart', '10000'),
('2sichat_mn_heart_timeout', '40000'),
('2sichat_cw_heart', '5000'),
('2sichat_mn_heartmin', '33000'),
('2sichat_live_notfy', '1'),
('2sichat_e_last3min', '1'),
('2sichat_e_last3minv', '180'),
('2sichat_live_type', '0'),
('2sichat_purge', '1'),
('2sichat_gad_lang', 'en'),
('2sichat_gad_trans', '1'),
('2sichat_ico_myspace', '1'),
('2sichat_ico_gplus', '1'),
('2sichat_ico_twit', '1'),
('2sichat_ico_fb', '1'),
('2sichat_ico_adthis', '1'),
('2sichat_board_index', 'everywhere'),
('2sichat_theme', 'default'),
('2sichat_live_online', '1'),
('2sichat_e_logs', '1'),
('2sichat_cookie_name', '2sichat'),
('2sichat_permissions', '0'),

('2sichat_simple_bbc', '1'),
('2sichat_disable', '0'),

('integrate_load_permissions', 'SAChat_load_permissions'),
('integrate_chat_admin', 'gadget_action,links_action'),
('integrate_chat_admin_template', 'chat_admin_area,link_admin_area'),
('integrate_chat_admin_config', 'soc_config'),

('integrate_pre_include', '$sourcedir/Subs-UsersOnlineToday.php,/home/u0fgcfwp0drf/public_html/kotct2017/Sources/SayThanks.php,$boarddir/sachat/Plugins/gadgets/gadgetsAdmin.php,$boarddir/sachat/Plugins/gadgets/template/gadgetAdmin.template.php,$boarddir/sachat/Plugins/links/linksAdmin.php,$boarddir/sachat/Plugins/links/template/linksAdmin.template.php,/home/u0fgcfwp0drf/public_html/kotct2017//Plugins/sociallinks/sociallinksAdmin.php,$boarddir/Sources/SAChatHooks.php'),

('integrate_admin_areas', 'SayThanks::setAdminArea,SAChat_admin_areas'),
('integrate_load_theme', 'SayThanks::loadTheme,SAChat_loadTheme'),



As you can see, they're different.  Think I'll try knocking them out one at a time.  What I'm not getting is why they've installed differently, and why the glitch is browser specific.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

I actually think those settings are the same as far as SA Chat is concerned - the difference is that there are some other hooks registered for other mods. 

I have something else for you to try...   

Im phpmyadmin, go to the smf_2sichat table.   If there isn't a default value for the 'inactive' column, set one.  NULL works. 

Let me know if that works....   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: