PHP: create zip from directory recursively

PHP has standard zip class “ZipArchive”. Zip files cab be created using that class, but when you need to add inner directories and files you need to use recursive approach. PHP provides RecursiveDirectoryIterator to recursively traverse directories and get inner directories and files. We are going to use RecursiveDirectoryIterator to traverse whole directory recursively and […]

Linux find text in files

That is why I love linux. Linux gives you fine grain control over your system with easy but very useful commands, searching text in files with so much control over output is not such an easy task in other operating systems but in linux its like a butter cake. To find a text in all […]

Download/Upload files using SSH

SSH is a really cool protocol to play with files, you can use scp command to upload and download files from server. Upload file from local to remote server Upload file from one server to another Downloading file from remote server to local system

How to secure you Magento installation from possible hacks

Magento is widely used as a powerful e-commerce platform, hence it is popular and widely used there are more hacks and malware created from outside world to attack magento to steal information or redirecting users to advertisement pages. Here I will tell you how you can protect your magento installation files, there are other steps […]

Linux: Add permission only on directory or files

That’s why I love linux, it has great deep level control over system, you can set permissions on just directories and skip files or just on files and skip directories. Isn’t that wonderful? In a web environment you don’t want to make core files writable but you want to have permissions for execute and read, […]

Magento Error 404 on every page

That is possible due to mod rewrite not working properly To solve this check either mod_rewrite is enabled if enabled then check your virtual host file and change it to following Often virtualhost file contains AllowOverride none that actually restricts magento .htacess files to execute. You need to put it to AllowOverride all.

Magento Product Page 404 error

If magento is not showing product page properly and displaying 404 page instead there might be possibility of reporting error. Check your error log file and see if that error is related to reporting then execute following query in the phpMyadmin