Category:

Detect is your website is access from Mobile and Device

This is very simple and useful tip to detect that your user is using Android or iOs device to log in to your website in CakePHP 3 it is even easier CakePHP 3 device detection  $isMobile = $this->request->is(‘mobile’); $isAndroid = stripos($this->request->header(‘User-Agent’), ‘Android’); $isIPhone = stripos($this->request->header(‘User-Agent’), ‘iPhone’); $isIPad = stripos($this->request->header(‘User-Agent’), ‘iPad’); Core PHP $iPhone = stripos($_SERVER[‘HTTP_USER_AGENT’],”iPhone”); $iPad […]

Continue Reading
Posted On :
Category:

Fixing Composer killed in terminal while updating application

When I try to update my application packages using composer in terminal it shows me Killed error and terminate the process. It is mainly due to server Memory Issue. You can fix using bellow command. I test this command on my live server and it works well for me. /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 /sbin/mkswap /var/swap.1 sudo […]

Continue Reading
Posted On :