Just translate some variables into Vietnamese today and found it got crazy working on my computer: When I turned into another page or even just refresh on SMF 2.1, the icon of loading in my browser appeared long long time and didn't stop loading.
Now check it and suddently open Task Manager found a list of cmd.exe and nslookup.exe running, search into SMF code, found this code from line 3505 to 3514 on Subs.php:
// This is nslookup; usually only Windows, but possibly some Unix?
if (!isset($host) && stripos(PHP_OS, 'win') !== false && strpos(strtolower(PHP_OS), 'darwin') === false && mt_rand(0, 1) == 1)
{
$test = @shell_exec('nslookup -timeout=1 ' . @escapeshellarg($ip));
if (strpos($test, 'Non-existent domain') !== false)
$host = '';
elseif (preg_match('~Name:\s+([^\s]+)~', $test, $match) == 1)
$host = $match[1];
}
When I make it be comment in PHP by put into /** */, it work fines with me and quickly loading a page. I installed SMF on localhost using USBwebserver 7.0 and my computer info:
QuoteYour Computer
Operating System:
Windows
NT 6.1 (Windows 7)
Current Browser / UA:
User Agent: Chrome 26.0.1410.12
Engine: AppleWebKit v: 537.31
Current Screen Resolution
1280 x 800 pixels
JavaScript
JavaScript is enabled.
Tomy, how exactly is this related to hooks in SMF 2.1?
Quote from: Tomy Tran on June 25, 2013, 07:50:16 AM
Just translate some variables into Vietnamese today
What exactly did you translate?
Oh, sorry I posted in wrong page because I have opened some pages at a time.
I believe this matter happened not relevant to translating. I have translated 2 files: Install.vietnamese.php & index.vietnamese.php
So you have issues with your system and hostname lookups. This is not an SMF bug as such - you should disable hostname lookups on your local installation on your computer.