Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Why "localhost" is always refered in the emails sent by KMP?

Author: Edward Hardin Reference Number: AA-00609 Views: 17540 Last Updated: 12/20/2010 04:49 PM 0 Rating/ Voters

It happens that an email that contains a link to an article sent by KMP has URL that you cannot open. For example it has "localhost" or "127.0.0.1" as domain name. It is possible due to KMP doesn't have a hard-coded setting that has current domain name. Instead it detects the domain name each time on the fly. This allows you to simply move KMP to another domain, or use multiple domain aliases.

There are two solutions to this problem. Right solution for you depend from what emails have incorrect links:

Emails sent manually

When you send an email from a KMP page manually (e.g.: via "Email to a Friend" form),  it inserts the same hostname to the URL as one in the address bar of your browser. For example if you're sending an email from a page on web-site-scripts.com, it will have the article URL with "web-site-scripts.com" domain.

However, if you opened KMP from a local server ("localhost"), the email will have URL with "localhost" for domain, e.g.:

http://localhost/knowledge-base/article/AA-00602/11/1.-General-overview.html

Email sent automatically

The domain part of the URL is taken from the second parameter of the cron job command.

e.g. for Linux/Unix:

* * * * * /usr/bin/php /usr/www/kmp/admin/CRON/cron.php http://localhost/

e.g. for Windows (cron.vbs):

WinScriptHost.Run "C:\PHP\php.exe c:\inetpub\wwwroot\kmp\admin\CRON\cron.php http://localhost/", 0

Solution is the same for all systems - replace "localhost" with correct domain name:

e.g. for Linux/Unix:

* * * * * /usr/bin/php /usr/www/kmp/admin/CRON/cron.php http://www.yourwebsite.com/

e.g. for Windows (cron.vbs):

WinScriptHost.Run "C:\PHP\php.exe c:\inetpub\wwwroot\kmp\admin\CRON\cron.php http://www.yourwebsite.com/", 0