Site still breaks every 30 days or so

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

The assistant did change it back. Am still looking for where the hosting company keeps the error logs.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

I added the ability to view the error logs and even though it's only been a few minutes, here is the first list of the error_log file:

[31-Dec-2016 11:23:38 America/Los_Angeles] PHP Notice: Undefined index: captcha_error in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fb836af5c922a3e27f3554c54e368a08b0b2aa62.module_db_tpl.FormBuilder;fb_9.php on line 113
[31-Dec-2016 11:23:38 America/Los_Angeles] PHP Notice: Trying to get property of non-object in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fb836af5c922a3e27f3554c54e368a08b0b2aa62.module_db_tpl.FormBuilder;fb_9.php on line 113
[31-Dec-2016 11:23:38 America/Los_Angeles] PHP Notice: Undefined index: captcha_error in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fc009201d2659a3a4e1fa925d0b0bde50ccb31e4.module_db_tpl.FormBuilder;fb_7.php on line 113
[31-Dec-2016 11:23:38 America/Los_Angeles] PHP Notice: Trying to get property of non-object in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fc009201d2659a3a4e1fa925d0b0bde50ccb31e4.module_db_tpl.FormBuilder;fb_7.php on line 113
[31-Dec-2016 11:23:41 America/Los_Angeles] PHP Notice: Undefined index: captcha_error in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fc009201d2659a3a4e1fa925d0b0bde50ccb31e4.module_db_tpl.FormBuilder;fb_7.php on line 113
[31-Dec-2016 11:23:41 America/Los_Angeles] PHP Notice: Trying to get property of non-object in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fc009201d2659a3a4e1fa925d0b0bde50ccb31e4.module_db_tpl.FormBuilder;fb_7.php on line 113


Does this tell you anything?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: Site still breaks every 30 days or so

Post by Jo Morg »

There is a minor issue with a FormBuilder template, but nothing serious and absolutely nothing that would break the site.
The only errors that we will need to account for are the ones occurring at the time the site breaks... Those will be difficult to chase, but should happen and should be the ones that may give some clues about your issue.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

Thanks, Jo.

I will check it next time it breaks...which should be tomorrow afternoon. :-)
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Site still breaks every 30 days or so

Post by JamesT »

I'm seeing a similar thing. My site is breaking periodically, which results in the site reverting to the title "CMSMS Site" and the templates generally looking messed up.

Going into admin and clearing cache fixes it, but obviously this has to stop happening.

This is what I'm seeing in the PHP log, but it may be a symptom as opposed to a cause.

Code: Select all

[28-Dec-2016 23:09:57 Europe/London] PHP Warning:  Invalid argument supplied for foreach() in /var/sites/m/mmm.co.uk/public_html/modules/Captcha/Captcha.module.php on line 576
[28-Dec-2016 23:09:57 Europe/London] PHP Fatal error:  Uncaught Error: Call to a member function getCaptcha() on null in /var/sites/m/mmm.co.uk/public_html/modules/Captcha/Captcha.module.php:581
Stack trace:
#0 /var/sites/m/mmm.co.uk/public_html/modules/FormBuilder/classes/Form.class.php(977): Captcha->getCaptcha()
#1 /var/sites/m/mmm.co.uk/public_html/modules/FormBuilder/action.default.php(227): fbForm->RenderForm('cntnt01', Array, '142')
#2 /var/sites/m/mmm.co.uk/public_html/lib/classes/class.CMSModule.php(1410): include('/var/sites/m/me...')
#3 /var/sites/m/mmm.co.uk/public_html/modules/FormBuilder/FormBuilder.module.php(182): CMSModule->DoAction('default', 'm62b34', Array, '142')
#4 /var/sites/m/mmm.co.uk/public_html/lib/classes/class.CMSModule.php(1477): FormBuilder->DoAction('default', 'm62b34', Array, '142')
#5 /var/sites/m/mmm.co.uk/public_html/lib/module.functions.php(105): CMSModule->DoActionBase('default', 'm62b34', Array, '142', Object(Smarty_Internal_Template))
#6 /var/sites/m/mmm.co.uk/public_html/lib/ in /var/sites/m/mmm.co.uk/public_html/modules/Captcha/Captcha.module.php on line 581
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Site still breaks every 30 days or so

Post by Rolf »

Troubleshooting a bug where you have now clue where to start you have the exclude parts that work/doesn't need, and thus continuously reduce the search area.

Start by disabling modules that you don't use/need. Always use the latest versions! Check error logs, access logs, use debug mode, etc. etc. Without this, it is looking in a glass boll and you can only guess what might happen.

But the chance it isn't related to CMSMS is very lickely. Have you contacted your webhost? Have you moved the website to another host/server and does it occur there too?
Is your website/server hacked?
...
...

Might have to do a blog on this some day...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Site still breaks every 30 days or so

Post by JamesT »

It's going to be tough to diagnose, I agree. The thought that it might be webhost related also occurred to me; the rise of "cloud hosting" doesn't necessarily feel good to me whereby files are scattered across different servers, sounds like a synching nightmare to me.

I always keep CMSMS and modules rigorously up to date though, and none of my modules are what I would consider "obscure". Disabling modules isn't really an option when they are all needed in production.

As for the webserver being hacked, not to my knowledge.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1968
Joined: Mon Jan 29, 2007 4:47 pm

Re: Site still breaks every 30 days or so

Post by Jo Morg »

JamesT wrote:

Code: Select all

PHP Fatal error:  Uncaught Error: Call to a member function getCaptcha() on null
Ok, this is a stupid bug on Captcha which only happens on upgrades (not sure why it only happens on some upgrades though) ... Being a module with very few options/settings uninstalling and reinstalling it can be an option and fixes this particular Captcha issue, just make sure you keep the settings somewhere so they can be restored after.
This however is (or should be) unrelated with the original topic afaik. The Captcha error should happen every time it is requested on a form or page, not only on specific time cycles and not on every page.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Site still breaks every 30 days or so

Post by JamesT »

The Captcha error disappeared completely after the site cache was cleared and the "broken site" issue was fixed, so it appears to have been a symptom of the "broken site" issue rather than anything else.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

Jo,

It just now broke again. I've attached the error log and am pasting in the System Info. As I mentioned, I did update to 2.1.6.

Clearing the tmp/templates_c folder fixed it, temporarily.


----------------------------------------------

Cms Version: 2.1.6

Installed Modules:

AceEditor2: 1.05
AdminSearch: 1.0.2
CGExtensions: 1.53.15
CMSContentManager: 1.1.4
CMSMailer: 6.2.14
Captcha: 0.5.3
DesignManager: 1.1.1
FileManager: 1.5.2
FormBuilder: 0.8.1.4
Gallery: 2.2
MicroTiny: 2.0.3
ModuleManager: 2.0.5
Navigator: 1.0.3
News: 2.50.6
Search: 1.50.2
SimpleSiteInfo: 3.2
SimpleSiteMgr: 3.2
SiteMapMadeSimple: 1.2.8


Config Information:

php_memory_limit:
max_upload_size: 25000000
url_rewriting: none
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: America/Los_Angeles
permissive_smarty: false


Php Information:

phpversion: 5.6.29
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 24575
E_STRICT: 2048
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 96M
max_execution_time: 60
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 25M
upload_max_filesize: 25M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 30
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
smarty_cache_udt: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache
Server Api: litespeed
Server Os: Linux 2.6.32-673.26.1.lve1.4.20.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.6.33
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /var/www/vhtdocs/userweb64006/html/tmp (0755)
tmp_cache: /var/www/vhtdocs/userweb64006/html/tmp/cache (0755)
templates_c: /var/www/vhtdocs/userweb64006/html/tmp/templates_c (0755)
modules: /var/www/vhtdocs/userweb64006/html/modules (0755)
uploads: /var/www/vhtdocs/userweb64006/html/uploads (0755)
File Creation Mask (umask): /var/www/vhtdocs/userweb64006/html/tmp/cache (0755)
config_file: 0444

----------------------------------------------
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

JamesT
Forum Members
Forum Members
Posts: 175
Joined: Tue Sep 08, 2015 10:41 am

Re: Site still breaks every 30 days or so

Post by JamesT »

webguru,

Do you ever see any of these?

Code: Select all

[02-Jan-2017 17:47:01 Europe/London] PHP Notice:  unserialize(): Error at offset 126591 of 359767 bytes in /var/sites/m/m.co.uk/public_html/lib/classes/internal/class.CmsTemplateCache.php on line 67
I see them happen occasionally and I wonder if it can lead to corruption in templates or something.
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

Not that I've ever noticed.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Site still breaks every 30 days or so

Post by Rolf »

[02-Jan-2017 08:46:37 America/Los_Angeles] PHP Notice: Undefined index: captcha_error in /var/www/vhtdocs/userweb64006/html/tmp/templates_c/FormBuilder^fc009201d2659a3a4e1fa925d0b0bde50ccb31e4.module_db_tpl.FormBuilder;fb_7.php on line 113
In general this is a harmless warning.

But what *might* happen here... You have the form in the footer of the website and not only on a contact page. So each page view will generate this warning! Having a rather busy website this *might* have an effect on the server process...

It is simple to fix, check your form template for:

Code: Select all

{if $captcha_error}
and change it in something like

Code: Select all

{if isset($captcha_error) && $captcha_error}
If it is not the cause the error log is cleaned of these warnings and it is simpler to see other errors/warnings. Worth a try!
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
webguru
Forum Members
Forum Members
Posts: 97
Joined: Thu May 08, 2014 6:18 pm

Re: Site still breaks every 30 days or so

Post by webguru »

Thanks, Rolf...I made the change and will keep an eye on it.

Are there any other options for Captcha that you know of? If this is the culprit, what do I do?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Site still breaks every 30 days or so

Post by Rolf »

If you still get (many) errors from the Captcha module, perhaps better disable the module because it also is shown each page load.

Easy (temporary) alternative is a honeypot https://www.cmscanbesimple.org/blog/hon ... ormbuilder
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”