SocialEngine 4: PHP warning: inet_pton():

Andrew - SocialEngine


Happily accepts anything as the client’s IP address from the $_SERVERglobal.

Malformed or malicious client requests thus can inject arbitrary strings into it, and as real life shows, they do supply strings like ‘unknown’ which causes the PHP warning mentioned in this issue’s title.

To fix this, edit the following file as below:  application/libraries/Engine/IP.php


--- a/web/application/libraries/Engine/IP.php
+++ b/web/application/libraries/Engine/IP.php
@@ -320,10 +320,12 @@
       $asIPv6 = self::$_preferIPv6;

+    $address = filter_var($address, FILTER_VALIDATE_IP);
     if( $asIPv6 ) {
       return self::convertIPv4to6($address);
     } else {
       return $address;


SocialEngine will be adding this little modification into their next release so i am informed.


Looking for quality SocialEngine Hosting? Look no further than Arvixe Web Hosting


Tags: , , , , , | Posted under SocialEngine | Leave a comment

Add default documents in Websitepanel

In this article, I’ll show how to add default documents for WebsitePanel. WebsitePanel allows us to add default documents to be loaded by the website. Learn More

Tags: , , , , , , , , , , , | Posted under WebsitePanel Tutorials | Leave a comment

Affiliates in OpenCart

Every store be it one starting out or a highly established business needs to perform marketing in order for it to grow. With your OpenCart store it won’t be any different, to grow, you will need to market. But how, how do you market an online store? Learn More

Tags: , , , | Posted under OpenCart | Leave a comment