You are here

Risharde's Blog

No longer supporting Kloxo

As many of you may know, I was using an open source control panel called Kloxo to host my previous versions of the website. However, I have switched control panels recently and thus most of the old posts I've made with regard to Kloxo fixes have been deleted as I created a new database for the new site. One of the reasons for not using Kloxo any longer was the lack of support for the latest CENTOS, which is currently 6.x as I write today. In addition, the control panel is extremely bulky and while the code is in PHP, it was very hard to customize to what I wanted. Even the template system in my opinion was very difficult to work with. The other issues were of course, the fear of its security level and the lack of API documentation and support for automation of the control panel. With that being said, I would still like to thank the Kloxo community for its invaluable support and for building a system that is free to use. I do hope that the above issues mentioned will be addressed in the future. Until then, the switch is permanent for the time being.

Virtualization in Windows

There are a few ways you can do virtualization in Windows. Firstly, for those of you who don't know about virtualization, I'll try to clarify what I mean by this. Virtualization is essentially the running of one or more "virtual" machines within a host operating system. For example, this article is specific towards running a Virtual Machine within Windows. Think of it as booting into your windows desktop, clicking an icon and then seeing a Window that shows you another computer booting. The Window that shows you another computer booting is doing this by "virtualization". Essentially, it involves additional software to be installed on your Windows based operating system which emulates a computer within Windows.

Firstly, you have to get the virtualization software running in Windows. This is actually very easy. There are many products available such as VMWARE Workstation (I believe there is a free trial but overall, this is software costs money) or a free alternative is Virtualbox which you can get via The VirtualBox project is an open source project sponsored by Oracle. So thank you to Oracle.

When you have finished downloading and installed the Virtualization software. You must create a new Virtual Machine. You'll also want to get a free operating system such as CentOS which is downloadable for free on the internet ( Download the .ISO files if you can. Once downloaded, make sure to point your virtual machine to boot from the ISO. This will allow you to boot the CENTOS operating system installer and follow the instructions on the screen.

Foods that cause heartburn at night

If you suffer from heart burn at night, you should avoid the following foods in particular in the evening time

- Milk
- Spicy food and/or pepper
- Acidic foods such as dhal coupled with pepper
- Too much water (not from experience but what I've heard from others)
- Juice

Home remedies (everyone is different but its worth a try)
- Commercial over the counter Antacids (such as local Dica seems to be more effective than tums)
- Probiotics
- Yogurt

Uninstalling applications that don't want to uninstall

I've come across trying to install some applications which simply don't want to uninstall via the Programs and Features section of the Windows Control Panel. Well the good news is that there are coders out there that are smarter than Microsoft that developed a really useful application that intelligently scans the application you want to uninstall and remove it from your computer. This comes in handy when trying to uninstall adware from your PC as well. The name of the application is Revo Uninstaller that there's a free version that does the basics. It saved one of my computers so far.

Stay away from EVE and SANTA ROSA brand products in Trinidad and Tobago

I noticed today that EVE brand canned sausages did not include the cholesterol values in its nutrition facts. Santa Rosa also DOES NOT put the values anymore either! What you may not know is that in nearly every can of sausages, there is about 40 mg of cholesterol per serving - which I can tell you is not very good for you to consume often from my experience. What does this imply? I would guess that EVE is purposefully not putting the value on its products in order to get it sold which I believe is wrong and I therefore distrust them even more now. Can you imagine what else they may not be putting on their products? You wouldn't even know what you are eating. This is unacceptable and a very shady practice and a big shame on EVE for doing this.

Useful IPTABLES commands

Save rules: service iptables save
Restart iptables: service iptables restart
Delete a rule 1:
iptables -D INPUT 1

iptables -A INPUT -p tcp --dport 80 -j ACCEPT

iptables -A INPUT -p tcp --dport 80 -j REJECT

iptables -A INPUT -s x.x.x.x -j DROP

Spoofed domain hn.kd.ny.adsl

I was able to get the actual ip range of the hn.kd.ny.adsl attacker. It seems the attacker uses compromised machines to do http attacks or perhaps bruteforce. Very strange indeed.

182.118.*.* seems to have some compromised servers trying an http attack on my linux box?

I shall keep monitoring...


Gzip a directory in linux

tar -zcvf archive-name.tar.gz directory-name

change archive-name to whatever you want. change directory-name to whatever directory name it is

Good luck

suPHP versus modPHP

So I've been testing both and there are a few trade offs here between suPHP and modPHP.

MODPHP Security
Firstly to get started, modPHP is supposed less safe sine PHP will run as apache thus a compromise on one website can lead to the reading of other directorys/websites of other users within the same linux server/box.

suPHP Security
suPHP security is indeed a notch higher when configured properly. Basically each user has their own username and suPHP will basically allow their website or in this case apache to run under the specific username. This means that if a website of a specific user were to be compromised, it would be much harder to get access to other websites on the box not running under the compromised user account.

HOWEVER, there is a catch
After my testing, I've noticed that suPHP is a bit slower but more importantly extremely CPU and memory intensive compared to its less secure modphp counterpart. At 50 users, the load on my server went up to 10.x which I have never seen happen with modphp. In fact, modphp wouldn't even break a serious sweat with this number of clients. More worrying is that suPHP used nearly 2 GBs of RAM during this 50 user load test while modPHP didn't go over 1 GB...

So really, the choice is up to you when it comes down to the security vs resources issue. I'm going to try caching with suPHP and see if that helps at all.

Converting between MySQL database engines

I can't remember where I got this, but this works

To convert from INNODB to MYISAM (MYSQL)

SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=MYISAM;') as ExecuteTheseSQLCommands
FROM information_schema.tables WHERE table_schema = 'yourdatabasename'
ORDER BY table_name DESC;

To convert from MYISAM to INNODB (MYSQL)

SELECT CONCAT('ALTER TABLE ', table_name, ' ENGINE=INNODB;') as ExecuteTheseSQLCommands
FROM information_schema.tables WHERE table_schema = 'yourdatabasename'
ORDER BY table_name DESC;