News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

500 error when trying to view SMF Error log.

Started by Chas Large, July 18, 2017, 04:09:12 AM

Previous topic - Next topic

Chas Large

Hi all,

When I try to view the Error Log in the SMF Maintenance page, I get Page not working HTTP ERROR 500

All other logs are viewable OK. All other posts and topics are OK.

I can see the site error log in the forum directory OK and see the error log table in the database.

I have tried checking, repairing and optimising the dB which all report OK but still cannot see the error log vie the forum software.

Any suggestions?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

Is there anything actually in the logs that you can see? Anything that provides a clue as to what the problem actually is?

Chas Large

Quote from: Arantor on July 18, 2017, 04:24:39 AM
Is there anything actually in the logs that you can see? Anything that provides a clue as to what the problem actually is?
Int eh db log (smf_log_errors you mean?) Yup, lots. Most report this:

8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Relating to Simple Portal but all the blocks are working correctly and am running the latest version 2.3.6

Can't see anything that would stop the log from being read by SMF.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

I doubt it would end up in the SMF error log because a 500 error is something having gone catastrophically wrong that PHP cannot recover from, and SMF can't log something after that point.

But you mentioned being able to see two logs...

Chas Large

Quote from: Arantor on July 18, 2017, 05:17:06 AM
I doubt it would end up in the SMF error log because a 500 error is something having gone catastrophically wrong that PHP cannot recover from, and SMF can't log something after that point.

But you mentioned being able to see two logs...
Yes, just proved that. I exported the table then emptied it and the 500 error remains.

Is the SMF error log in the maintenance section reporting the database error log or some other file?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

The admin area reports what's in the DB, and only what's in the DB. The other error log is the one likely to actually have something useful in it.

Chas Large

Quote from: Arantor on July 18, 2017, 05:41:14 AM
The admin area reports what's in the DB, and only what's in the DB. The other error log is the one likely to actually have something useful in it.
Gotcha! Found this in the error_log of the site.

PHP Fatal error:  Cannot redeclare template_attachment_errors() (previously declared in /home/mysite/public_html/forum/Themes/default/Errors.template.php:206) in /home/mysite/public_html/forum/Themes/default/Errors.template.php on line 244

Switching themes does not help, so I'll restore a backup of the Error.template.php file in case that is some how bad.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Chas Large

Yup, that fixed it. I replaced it with the backup file (ends in a tilde ~) and I can see the error log once more.

Thanks for your help Arantor, much obliged.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Advertisement: