Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
When clicking the check user button in the new member queue, I get this following error:

Fatal error: Call to undefined function iconv() in /home/myforum/public_html/libs/user.inc.php on line 639

This just started happening. I did recently move to a new server with new IP but URLs are all the same. Any ideas?

Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
1) Are you allowing special characters in user names?
2) Did you just recently switch your database tables from ISO-8859-1 to UTF-8?


iconv has to do with multibyte characters. Does your new server have the iconv() library installed
https://www.hackersgarage.com/iconv-php-extension-installation-without-recompiling-php.html
Attachments
20170116_11-35-17.PNG


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by id242
1) Are you allowing special characters in user names?
2) Did you just recently switch your database tables from ISO-8859-1 to UTF-8?


iconv has to do with multibyte characters. Does your new server have the iconv() library installed
https://www.hackersgarage.com/iconv-php-extension-installation-without-recompiling-php.html

I'll bet that's it. Thanks!

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
UPDATE - Yes, indeed installing iconv got rid of the error, but now I have a related question.

When I click on Check This User, the spam checker never shows anything for Email Status or Reg. IP status. Seems I got some indications before I changed servers. Any idea what else might be needed to make this function properly?

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Basil, I would check your error logs and see if you're getting and 403 requests, it's possible that the suhosin module on your server is killing the connection; it is also possible that your host has configured fsockopen to not allow connections to outside servers (generally done as a form of security, but really breaks things that rely on 3rd party databases).

As for the aforementioned error, these are generally covered in the UBB.threads System Requirements Test, you might give it a run to see if there are any detectable issues that it can find with your server configuration.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Gizmo, I don't see any 403 errors. I ran the System Requirements test and it shows no issues. Here's a dumb question. I can see in the test_stopforumspam.php that the script makes a connection to www.stopforumspam.com My question(s):

1. Is it possible my new server's IP is blocked by them and
2. When I look on that web site, it appears I may need an "API Key?" Thing is, this script was working before I moved to the new server.

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Originally Posted by Basil
1. Is it possible my new server's IP is blocked by them
Doubtful, but their developer is a pretty cool guy, feel free to just outright ask him if your server is blacklisted (I can't see why they'd have you blacklisted; a large chance is that your host is blocking outside connections to file_get_contents).

Originally Posted by Basil
2. When I look on that web site, it appears I may need an "API Key?" Thing is, this script was working before I moved to the new server.
Stop Forum Spam requires an API Key to send data to their database; a key is not required to send a remote query with file_get_contents, but file_get_contents needs to be able to contact to "the outside world" (some webhosts restrict remote content).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Ok, thanks. I am submitting a ticket to my server management to see of they can see why it might not be working.

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
They don't see any issues that would block the stopforumspam web site. However, in poking around in the stop forum spam script I notice something interesting / strange. If you look at this code where the stopforumspam API is contacted:

PHP Code
// Check API Status in a popup
if ($op == 'test') {
$xmlResult = @file_get_contents("http://www.stopforumspam.com/api?ip=". $_SERVER["SERVER_ADDR"]);
if($xmlResult != false) {
	$xml = new SimpleXMLElement($xmlResult);
	if($xml->appears == 'no') {
		$SFS_Status_Class = 'sfsgood';
		$SFS_Status = $ubbt_lang['SFS_STAT_GOOD'];
	} else {
		$SFS_Status_Class = 'sfsbad';
		$SFS_Status = $ubbt_lang['SFS_STAT_BAD']; 

When I go into the Stop Forum Spam control panel and click "test connectivity" I get a popup that I think SHOULD say either "Can Connect" or if it is not connecting, it should say "Can't Connect" But instead I get blank for IP Status. Any other ideas or thoughts?



Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Remove that @ before file_get_contents and tell me if it throws an error.

As for your report about the status page, are you at the right page for the data you want? There are two of them, one, which has the api status test is pretty bare:
CP -> Master Settings -> Primary Settings -> Stop Forum Spam -> Test Connectivity

The other is when you're looking at a member and click "More Info" which has, more information.

The strings on the Test connectivity page are just:
$ubbt_lang['SF_SPAM'] = "Stop Forum Spam";
$ubbt_lang['SFS_STAT_DESC'] = "API Status: ";
$ubbt_lang['SFS_STAT_GOOD'] = "Can Connect";
$ubbt_lang['SFS_STAT_BAD'] = "Can Not Connect";
$ubbt_lang['SFS_TEST_IT'] = "Test Connectivity";

If the language strings do NOT load on these pages, you may not have the languages/english/admin/stop_forum_spam.php language file in place.

I wrote yet another test script for file_get_contents (there really isn't anything we can do at this point, it's a simple request from your server to their server, if something is found it just sorts the file):
PHP Code

<?php
	$payload = "91.200.13.3";

	if(function_exists("file_get_contents")) {
		$fetch = file_get_contents("https://api.stopforumspam.org/api?ip=". $payload);
		if($fetch != false) {
			if($fetch != "Error") {
				$xml = new SimpleXMLElement($fetch);

				if($xml->appears == "yes") {
					echo("We could connect to the Stop Forum Spam Database and have checked the dataset specified, the user \"". $payload ."\" is a spammer.");
				} else {
					echo("We could connect to the Stop Forum Spam Database and have checked the dataset specified, the user \"". $payload ."\" is <b>not</b> a spammer.");
				}
			} else {
				echo("There was an error with the response from the Stop Forum Spam Database.");
			}
		} else {
			echo("We could not establish a connection to the Stop Forum Spam Database, please ensure that your webhost does not restrict outside connections via the \"file_get_contents\" PHP Function.");
		}
	} else {
		echo("The PHP function \"file_get_contents\" does not exist on this server.");
	}
?>



You could also try my check new version code:
PHP Code

<?php
	$build = "20170101";
	if(function_exists("file_get_contents")) {
		$source = file_get_contents("https://www.ubbwiki.com/latest/check/system-requirement-test");

		if(version_compare($source, $build, ">")) {
			echo("<div style=\"text-align: center;\">\n\t<h2 class=\"heading notice\">Outdated Test Script Version</h2><br>\n</div>\n\nAn upgrade to the UBB.threads System Requirement Test is available, please see <a href=\"https://www.ubbwiki.com/\" target=\"_blank\">UBB.Wiki</a>: <a href=\"https://www.ubbwiki.com/latest/system-requirement-test\" target=\"_blank\">Latest System Requirement Test</a>. <b>Your Build</b>: ". $build ." <b>Latest Build</b>: ". $source ."<br><br>\n\n");
		}
	}
?>

Attachments
aaa.png bbb.png


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Problem Solved! While I did go to SSH and edit php.ini so that allow_url_fopen=on and restarted Apache, apparently I needed to use the "Multi ini tool" in WHM to set it to ON. Once I did that viola! All is working now! Thanks for all the help.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 522 guests, and 99 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)