Error 500 when installing a forum plugin

Hi to all,
it is nice to be back after the Discord channel closed.

I have a question that perhaps you can help me with and that is puzzling me because I never seen it before.

I have got a small forum running MyBB and when I tried to install a plugin called Google Analytics 4 and Google Universal Analytics it fails (never saw this sort of error on any other plugin)

This page isn't working at the moment yourdomain.com can't currently handle this request. HTTP ERROR 500

How and where can I debug this or find what sort of error this is?
This is a must have plugin with the new GA4 api’s and I tried every single thing (deactivating them all and try just that one, again to no avail)

I know that this plugin does database changes but I do not know where to look for the error log

If anybody can help I would be very thankful

I am running Ubuntu 18.04 ( I know I need to upgrade) and Hestia v1.7.9

Check the error log of your domain

1 Like

Hi Jaap. I checked it using the CP binoculars icon and it doesn’t show 1 single error on the log of the subdomain where I have the forum.

`Last 70 lines of myforum.domain.com.error.log`
and not a single line is there

I then restarted every service and tried to activate the plugin and the same happens

This is the most weird error that ever happened on the forum and I am clueless!

What PHP version are you using with this domain?

1 Like

The PHP version is 7.4.33

Hi Kristan, you asked about the PHP version, can you give me any hint on why this 500 error shows up.
I tried it on the staging forum we use to introduce new things and the same happens also.

Not even disabling all plugins and try just that one works (that shows it is not a plugin compatibility issue)
I am really lost here, if you can give me leads to investigate I would be thankful

Check if in the php app error logs are disabled. It is for us impossible to guess if there is no error…

1 Like

After reading quite a few ways to fix the 500 error, I couldn’t do it, however I did get my hands now on the error.log

Stack trace:
#0 /home/mybb/web/betaforum.mydomain.com/public_html/gate/modules/config/plugins.php(433): googleanalytics_activate()
#1 /home/mybb/web/betaforum.mydomain.com/public_html/gate/index.php(824): require('/home/mybb/web/...')
#2 {main}
  thrown in /home/mybb/web/betaforum.mydomain.com/public_html/inc/plugins/googleanalytics.php on line 73" while reading response header from upstream, client: 146.70.105.8, server: betaforum.mydomain.com, request: "GET /gate/index.php?module=config-plugins&action=activate&plugin=googleanalytics&my_post_key=f044d2dfa07cd1b7e74d08e949f0a30a HTTP/2.0", upstream: "fastcgi://unix:/run/php/betaforum.mydomain.com.sock:", host: "betaforum.mydomain.com"
2023/07/24 22:31:05 [error] 16772#16772: *132635 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function read() on null in /home/mybb/web/betaforum.mydomain.com/public_html/inc/plugins/googleanalytics.php:73

I hope this somehow helps

Thank you Jaap

https://www.php.net/manual-lookup.php?pattern=read&scope=quickref

Function does not exists… It looks like a bug in your plugin

1 Like