Archive by Author

Extract modified files from GIT

Recently I stumbled upon a great script for extracting modified files between two GIT commits. This is great for website deployments assuming on client side only ftp is accepted. #!/bin/bash BOLD=”\033[1m” _BOLD=”\033[22m” RED=”\033[31m” YELLOW=”\033[33m” GREEN=”\033[32m” RESET=”\033[39m” range=$1 if [ -z … Continue reading

fix for an iframe injection attack

more and more people, including some of my clients get attack by various versions of iframe injections. One of them, includes injecting a php file inside the host. after that, by various means, in all the htaccess files it’s injected … Continue reading

Magento problems: General error: 1005

The exact error I kept getting was: exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[HY000]: General error: 1005 Can’t create table ‘xxx catalog_category_flat_store_1.frm’ (errno: 150)’ in xxx/lib/Zend/Db/Statement/Pdo.php:234 The solution is to execute the following statements inside phpMyAdmin: ALTER TABLE catalog_category_entity ENGINE=INNODB ALTER TABLE … Continue reading

Solving: mod_fcgid: read data timeout

This is starting to be a more and more common problem because the hosting companies are using fcgid more often (which is a great thing as fcgid and suexec combination has a lot of advantages). solving the read data timeout … Continue reading

error removing addon domain from cpanel

Recently I was unable to remove a domain from cpanel after firstly I deleted the dns zone for that domain (using whm) The error was: “There was a problem removing the Addon Domain” and details of the error explained: “Error … Continue reading

Centos add additional repositories

yum install yum-priorities edit all .repo files from /etc/yum.repos.d/ and add bellow: [base], [addons], [updates], [extras], [centosplus] priority=1 bellow [contrib] priority=2 download RPMforge and check the file rpm –import http://apt.sw.be/RPM-GPG-KEY.dag.txt rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm install and check the installation rpm -i … Continue reading

Cpanel: change ssl port for apache

The title it’s choosen to have cpanel word in it because changing ssl port from 443 to something else directly in http.conf will bring trouble when you create a new account for instance (cpanel rebuilds http.conf automatically) so keeping things … Continue reading

protect server from high load

Bellow is a bash script that will save you a lot of energy and headaches when your server gets a high load. For instance if some of your clients / websites is going in an infinite loop because of a … Continue reading