Advertisement:

Author Topic: 500 error when trying to view SMF Error log.  (Read 340 times)

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
500 error when trying to view SMF Error log.
« on: July 18, 2017, 04:09:12 AM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,061
    • Arantor on GitHub
Re: 500 error when trying to view SMF Error log.
« Reply #1 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?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: 500 error when trying to view SMF Error log.
« Reply #2 on: July 18, 2017, 05:15:33 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:

Code: [Select]
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,061
    • Arantor on GitHub
Re: 500 error when trying to view SMF Error log.
« Reply #3 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...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: 500 error when trying to view SMF Error log.
« Reply #4 on: July 18, 2017, 05:19:40 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,061
    • Arantor on GitHub
Re: 500 error when trying to view SMF Error log.
« Reply #5 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: 500 error when trying to view SMF Error log.
« Reply #6 on: July 18, 2017, 05:54:24 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.

Code: [Select]
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.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: 500 error when trying to view SMF Error log.
« Reply #7 on: July 18, 2017, 05:56:42 AM »
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.