WordPress: Fix permalink issue “Not Found” in Ubuntu

run command: nano¬† /etc/apache2/apache2.conf Change from “AllowOverride None” to “AllowOverride All” Save and close Now run: a2enmod rewrite Now run sudo service apache2 restart It should work now.

Fix SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by

MySQL 5.7.5+ changed the GROUP BY behavior. So in this and future versions GROUP BY would not work in same way as it used to be before. So to make GROUP BY feature working like before follow these details: Note: First of all to follow these steps you must need to have root access to […]

PHP: How to fix Image rotation issue in img tag because of EXIF

Photos captured by some smartphones especially iPhones are automatically rotated when we use it in <img> tag which is mostly not acceptable as we don’t need such unwanted rotation. This happens because of EXIF Data stored in that image. But we can easily fix it using PHP by following these steps: function autorotate($src) { // […]

PHP: Array Version of htmlspecialchars() function

htmlspecialchars() function should be used for security reason to echo values from any variable. But htmlspecialchars() doe’s not work for arrays so following function would help to escape html characters from array values: