Error in the frontend, not apache logs?

Started by SirLouen, March 04, 2023, 06:39:44 AM

Previous topic - Next topic

SirLouen

I'm checking the apache error log for the VirtualHost where I have my SMF, but I don't see anything, but if I access the forum I'm seeing an error just in the middle in the screen

implode(): Argument #2 ($array) must be of type ?array, string given

Call to undefined function create_function()

Cant debug this issues because I can't see what is provoking them. I cannot access admin panel or anything like that (AFAIK there was an error log within the menu, but cannot access such menu either)

How is the logging protocol on SMF? Isn't a regular PHP application? What could be hindering apache logging? I have many othet sites in the same hosts, with equivalent VirtualHost but I'm not having such issue

Aleksi "Lex" Kilpinen

Check this out, might help you out.
https://custom.simplemachines.org/index.php?mod=4300

What's happened is that the PHP version has changed, and the code you are using is no longer supported.

For the logging, you are better off asking your host why this isn't logged. It should IMO.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

SirLouen

Quote from: Aleksi "Lex" Kilpinen on March 04, 2023, 07:16:31 AMCheck this out, might help you out.
https://custom.simplemachines.org/index.php?mod=4300

What's happened is that the PHP version has changed, and the code you are using is no longer supported.

For the logging, you are better off asking your host why this isn't logged. It should IMO.

I'm the server owner, so there is no hosting behind
It's true that I moved into 8.1 and there is where errors started popping out. I've moved back to 7.4

But I don't understand why errors are not being logged. There is nothing special in such Apache2 VirtualHost.

I definitely know that is an incompatibility between PHP 8.1 and SMF 2.0.19 but it would be nice to track down the exact issue which is improbable to be solved. I would like to upgrade to 2.1 but some of the plugins I'm using are not compatible and this makes me very reticent because I have not found yet good substitutes.

Arantor

So which php.ini file is in use and what does that say for the error reporting values? (phpinfo() is probably your friend here)

SirLouen

Quote from: Arantor on March 04, 2023, 09:43:09 AMSo which php.ini file is in use and what does that say for the error reporting values? (phpinfo() is probably your friend here)


Yes this is the first think I checked: logs are being logged and there are actually logs. But not for this two specific errors I'm mentioning above

I've also tested with php8.0-fpm and same errors pop out, so definitely only php7.4 works right now (for some reason I thought that php8.0 was happy with 2.0.19 as I've read in the forums a while ago, I only can think on some plugin like Optimus or the liking which is causing the conflict, but without more debug I'm stuck)

Also it is a little bit strange, that neither on the internal Administration logs, I see anything aditional to such errors given during the process of being under PHP 8.0


Arantor

Well, 2.0.19 is fine with 8.0 - so clearly these are mods that have added custom bbcode (or some other closure-style behaviour).

You can probably find the create_function incident readily enough, just search for create_function as see what pops out.

As a side measure try adding $db_show_debug = true; to Settings.php - it will show the queries being used on the page but it'll also limit SMF's 'try to glom all the errors into SMF's own log' behaviour so you stand more chance of seeing the raw errors.

Advertisement: