Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: landyvlad on August 01, 2022, 02:09:11 AM

Title: undefined function shell_exec() error
Post by: landyvlad on August 01, 2022, 02:09:11 AM
Most members (including me) experiencing an issue where - if they are logged off and go to the forum URL they get an error:
undefined function shell_exec()

refer attached screenshot
gsx14error.jpg

It is still possible to login, but its somewhat frustrating.

Once logged in there don't appear to be ongoing errors - but it reoccurs every time some one is not logged in and goes the the forum URL.

That in turn could ause people to assume toe h=]frium is non working and not attempt a login.  It's not a great look.

Anyone else had this / know how to resolve it?


Oh one member appears to be having deeper problems but unsure if related?

QuoteI found that by ignoring the error on log-in I could read stuff, but I can't get some posts uploaded - 404 Access to this resource on the server is denied
Still happening this morning.
Edit - The above proves that I can post stuff, but it is the adventures & ride-outs section I'm having difficulty with.

Title: Re: undefined function shell_exec() error
Post by: landyvlad on August 01, 2022, 02:16:41 AM
error log snip attached
gsx14error2.JPG
Title: Re: undefined function shell_exec() error
Post by: Arantor on August 01, 2022, 03:11:45 AM
Select "disable host name lookups" in the server settings area.
Title: Re: undefined function shell_exec() error
Post by: landyvlad on August 01, 2022, 07:28:29 PM
Thanks mate. I had made no changes to that so unsure why/how this problem cropped up in the first place?

I've made the change now and it seems to be OK for me at least :)
Title: Re: undefined function shell_exec() error
Post by: Arantor on August 01, 2022, 08:08:32 PM
Sounds to me like you got ninja-upgraded to PHP 8.

In earlier versions of PHP, the function was listed as existing but not callable if disabled, now it's listed as not defined entirely if not callable. shell_exec is often restricted because them evil hax0rz use it.
Title: Re: undefined function shell_exec() error
Post by: landyvlad on August 03, 2022, 10:09:25 PM
Ok thanks for the explanation mate.  :D

And problem has fully resolved following the recommended fix.