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
Can you log in there? I assume that you are the administrator.
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.
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.)
I'll go try
I did not see an "disable hostname lookup"
Admin -> Server Settings
Bah, I looked at the source code and it said general settings but I forgot which one, thanks vbgamer.
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"
Php version?
I get that error too on SMF 2.0.19 with PHP 8.1 has to be fixed in a bunch of spots though :(
2.0.19 doesn't support php 8.1, it works but logs errors. Simplest solution is downgrade to php 8.0.
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
Admin -> Support and Credits
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
Yes, and that shows that you are running php 8.1.
Need to downgrade to 8.0
Or upgrade to smf 2.1.4
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.
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
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!
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?
Go into your hosting panel and repair it.