upgrade from varnish 3 to varnish 4

refere to the below table to know what exactly to change on your default VCL file. V3 V4 {bereq,req}.backend.healthy std.healthy({bereq.backend,req.backend_hint}) {bereq,req}.request {bereq,req}.method bereq.* in vcl_pass and vcl_miss req.* {beresp,obj,resp}.response {beresp,obj,resp}.reason beresp.storage beresp.storage_hint {client,server}.port std.port({client,server}.ip) error code response return (synth(code, response))… Continue Reading

get user ip php

get user client ip address using php :   function get_client_ip_server() { $ipaddress = ”; if ($_SERVER[‘HTTP_CLIENT_IP’]) $ipaddress = $_SERVER[‘HTTP_CLIENT_IP’]; else if($_SERVER[‘HTTP_X_FORWARDED_FOR’]) $ipaddress = $_SERVER[‘HTTP_X_FORWARDED_FOR’]; else if($_SERVER[‘HTTP_X_FORWARDED’]) $ipaddress = $_SERVER[‘HTTP_X_FORWARDED’]; else if($_SERVER[‘HTTP_FORWARDED_FOR’]) $ipaddress = $_SERVER[‘HTTP_FORWARDED_FOR’]; else if($_SERVER[‘HTTP_FORWARDED’]) $ipaddress = $_SERVER[‘HTTP_FORWARDED’];… Continue Reading

Add a Trusted root CA on Firefox

how to Add a Trusted root CA on Firefox Fire a Firefox browser (i.e. Launch Firefox) Choose Preferences from the Edit menu. Click the Advanced button. Select the Encryption pane. Click the View Certificates button. Click the Authorities tab. Click the Import button at the bottom of the screen. Navigate to the CA certificate and… Continue Reading

[Solved] android could not get unknown property compile

this could happen when missing with activity creation and deletion, it can be fixed easily as below   compile ‘com.android.support:appcompat-v7:22.2.1’ compile ‘com.parse.bolts:bolts-tasks:1.3.0’ compile ‘com.parse:parse-android:1.11.0’ compile ‘com.android.support:design:22.2.1’ compile ‘com.android.support:design:22.2.1′ to be like this : compile’com.android.support:appcompat-v7:22.2.1’ compile ‘com.parse.bolts:bolts-tasks:1.3.0’ compile ‘com.parse:parse-android:1.11.0’ compile ‘com.android.support:design:22.2.1’… Continue Reading