Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: hunterdown on June 09, 2024, 12:17:18 PM

Title: Error Code
Post by: hunterdown on June 09, 2024, 12:17:18 PM
Hello, I'm very new at this so please bear with me. The tech guy that worked with my website has passed away and I'm just learning this as I go.

I have an error code "Call to undefined function shell_exec()" that I have no idea how to fix.
I'm running SMF 2.0.19

I tried to add a link to my site, but it says that I'm not allowed.
The site is Minnesota Outdoorsman
If you search it and click on the link, the error page will be the first thing you see.

The guy that took over the server for my passed friend, seems to think that the error code is generated by a video block I have in "TinyPortal 2.3.0", but that could be a guess at this point.

Thanks in advance for any help,
HD


Title: Re: Error Code
Post by: zedd151 on June 09, 2024, 12:41:08 PM
Can you log in there? I assume that you are the administrator.
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 01:10:54 PM
I can log in, I am the administrator
The members don't see the error and neither do I unless you log out and then go back before logging in.
The error logs are full because "guests" try to view the site.
Title: Re: Error Code
Post by: Arantor on June 09, 2024, 01:14:08 PM
If you can log in and get to the admin area, does the problem go away if you go the features and options > general settings page and tick 'disable hostname lookup' and hit save?

(This is the usual cause of shell_exec, because SMF uses it to look up hostnames, but shell_exec is often banned on hosting environments.)
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 01:16:21 PM
I'll go try
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 01:22:17 PM
I did not see an "disable hostname lookup"
Title: Re: Error Code
Post by: vbgamer45 on June 09, 2024, 01:34:46 PM
Admin -> Server Settings
Title: Re: Error Code
Post by: Arantor on June 09, 2024, 01:38:32 PM
Bah, I looked at the source code and it said general settings but I forgot which one, thanks vbgamer.
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 02:52:14 PM
WINNER, WINNER, CHICKEN DINNER!

That seemed to do the trick! Ya'll are awesome!
Like I said, I'm new at this, and have a lot to learn. I got "gifted" this site, and am trying to keep it afloat.

This is the next one I have in the error logs often, any ideas?
"8192: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated"
Title: Re: Error Code
Post by: Sir Osis of Liver on June 09, 2024, 02:56:08 PM
Php version?
Title: Re: Error Code
Post by: vbgamer45 on June 09, 2024, 02:59:24 PM
I get that error too on SMF 2.0.19 with PHP 8.1 has to be fixed in a bunch of spots though :(
Title: Re: Error Code
Post by: Sir Osis of Liver on June 09, 2024, 03:02:08 PM
2.0.19 doesn't support php 8.1, it works but logs errors.  Simplest solution is downgrade to php 8.0.
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 03:39:59 PM
Where would I find which version of PHP I'm using?
All I can find is the version of SMF and the version of Tinyportal
Title: Re: Error Code
Post by: vbgamer45 on June 09, 2024, 03:51:59 PM
Admin -> Support and Credits
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 04:00:26 PM
Found it,thanks vbgamer45!
Here's what it says:

Version Information:
Forum version: SMF 2.0.19 (more detailed)
Current SMF version: SMF 2.0.19
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 8.0.32
PHP: 8.1.27
Server version: Apache
Title: Re: Error Code
Post by: Kindred on June 09, 2024, 04:06:09 PM
Yes, and that shows that you are running php 8.1.

Need to downgrade to 8.0
Or upgrade to smf 2.1.4
Title: Re: Error Code
Post by: hunterdown on June 09, 2024, 05:33:24 PM
I guess I have to ask, which is easier?
I have limited knowledge of how this stuff works.

I've never done an upgrade or a downgrade, and wouldn't even know where to start.

Les (my friend that passed) always told me that he would need to do a mirror site when upgrading to make sure everything worked before bringing it "on-line" (something to do with the mods working together with the new version) But, I don't believe I have that capability....I run my site off of a Chromebook.
Title: Re: Error Code
Post by: Kindred on June 09, 2024, 09:29:26 PM
Just make sure that your server has backups.  Then, if you screw something up, you can restore the backup.


As for upgrading, I would say upgrade smf. See the online manual (link at top of page) on steps for a major upgrade
Title: Re: Error Code
Post by: hunterdown on June 10, 2024, 08:03:00 AM
Did some poking around my cpanel and the server guy changed the PHP from 8.1 to 8.0.
Then did the forum maintenance, clearing all the logs.....IT WORKED!
We're running smoothly again, no more errors.

Yup Kindred, the server does have backups done periodically and I try to download one weekly.
I'll need to do a lot of reading before I try an upgrade, like I said, I'm very green at this.

I do want to thank all of you for helping me, it is very much appreciated!
Title: Re: Error Code
Post by: hunterdown on June 17, 2024, 06:19:00 PM
Now I have this one...
Database Error
Incorrect key file for table './mnoutdoo_smf2826/smfsc_log_online.MYI'; try to repair it
File: /home/mnoutdoo/public_html/forums/Sources/Subs.php
Line: 2681

Any ideas?
Title: Re: Error Code
Post by: Kindred on June 17, 2024, 07:20:32 PM
Go into your hosting panel and repair it.