svenk
Forum Replies Created
-
The same problem with TLS option I have. Please help!
Works in 2.8.2, thanks.
protected static function _get_ip2long_remote_ip(){ $long_ip = array(0, 0); if (isset($_SERVER["REMOTE_ADDR"]) && long2ip($ip2long = ip2long($_SERVER["REMOTE_ADDR"])) == $_SERVER["REMOTE_ADDR"]) $long_ip[0] = $ip2long; if (isset($_SERVER["HTTP_CLIENT_IP"]) && long2ip($long_ip[1] = ip2long($_SERVER["HTTP_CLIENT_IP"])) == $_SERVER["HTTP_CLIENT_IP"]) return $long_ip; if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))$long_ip[0] returns “REMOTE_ADDR”
' Look for a proxy address first Dim _ip As String = Request.ServerVariables("HTTP_X_FORWARDED_FOR") ' If there is no proxy, get the standard remote address If (_ip = "" Or _ip.ToLower = "unknown") Then _ _ip = Request.ServerVariables("REMOTE_ADDR")and if I remember right in your code is the opposite,
first REMOTE_ADDR than HTTP_X_FORWARDED_FORjust for the information on the subject check this link
hi, the same here:
“Right Now” view -> No data to display
“Overview” – “Spy View” -> shows new data
additionally it seems Google Analytics for WordPress stopped working,
after deactivating and activating works againWith the logic described above:
If $long_other_ip is NOT empty then
swap content of $long_other_ip and $long_user_ipYou are welcome. I think WP SlimStat could cover both situations:
1. User, internal IP -> Proxy, Public IP –> WP SlimStat with Public IP
2. User, Public IP –> Proxy, on the WP side -> WP SlimStat, internal IPbut not also the third, two Proxy situation:
3. User, internal IP -> Proxy, Public IP –> Proxy, on the WP side -> WP SlimStat, internal IP
The situation is:
If user is coming from my proxy (from Internet) situation is:
$long_user_ip – my proxy internal address
$long_other_ip – user’s address (what I need)If user is coming from internal network situation is:
$long_user_ip – internal address (what I need)
$long_other_ip – emptySo test criteria and follow up can be:
If $long_other_ip is NOT empty then
swap content of $long_other_ip and $long_user_ip
Else do nothing.Actually it works for my configuration:
Internet -> Squid reverse proxy -> Web on the internal network 192.168.1.x
So all my users are behind the proxy. The drawback is that I’m “losing” my internal network users info. But that is not so important. If there is a better way, please suggest.
OK, to be able to see data on the World Map I had to swap variables like this:
// User's IP address // list($long_user_ip, $long_other_ip) = $this->_get_ip2long_remote_ip(); list($long_other_ip, $long_user_ip) = $this->_get_ip2long_remote_ip();A better logic would be if $long_other_ip is populated than swop with $long_user_ip, otherwise use $long_user_ip. What do you think?
Let’s wait a little, now I can see one country colored in the World Map.
Hi,again,I changed my reverse proxy to squid, and now I can see both IPs:
vpn.mydomain.hr (192.168.1.13) 66.249.66.194
How can I get second IP address presented on my World Map in WP SlimStat?
I tried the above code and it did not work.Forum: Plugins
In reply to: [WordPress Move] wordpress-move/backup, DBBackup*.sql size 0Nothing happens when I put define( ‘WP_DEBUG’, true );
in the file /var/www/wordpress/wp-config.php
Why debugging is not working?DBBackup* files with the size 0 are stored in:
/var/www/wordpress/wp-content/plugins/wordpress-move/backupI compared permissions with a site where WP-move works. There are the same. Ownership is by www-data user and group. The difference is, on not-working site I’m using multilingual plugin WPML and some others.
Forum: Plugins
In reply to: [WordPress Move] wordpress-move/backup, DBBackup*.sql size 0I never debugged WP before. In the file /var/www/wordpress/wp-config.php
I added three lines at the end and restarted:define(‘WP_DEBUG’, true); // Turn debugging ON
define(‘WP_DEBUG_DISPLAY’, false); // Turn forced display OFF
define(‘WP_DEBUG_LOG’, true); // Turn logging to wp-content/debug.log ONThan I tried to backup database in Backup Manager. But the file wp-content/debug.log is not created?