eAccelerator is a wonderful mechanism to speed up slow php. In general, the idea is simple 😆 when running php scripts, this nonsense keeps them up to date. opcode level and on the next call if there are no changes in the script the opcode copy is used. The result is faster execution at low server load, less waste of resources. Basically it is.

Now to share the simplicity that I managed to create. A little less than a week ago on a server I updated the php version I use because of the fatal one CVE-2010-4645 bug. I updated the version to 5.2.17 where I saw, that it has been repaired. I didn't risk it 5.3.5 version, that there are differences and I don't know how it will work , and most importantly, it was late at night. Said done. The update went more than smoothly, but after I finished I was impressed that the agility of the site dropped a lot. But one of the developers had warned me, that they would test new scripts and I didn't pay much attention to it. Yesterday I had to set some cron to php and when I played them I saw a rather unpleasant inscription, that my compilation of eAccelerator is for the start version of my php and does not work with the new one ;). Everything is clear now. I quickly recompiled the eAccelerator and everything fell into place according to rough observations. The loading of the pages dropped twice as valuable megabytes of RAM were released.. In general, at least I have already done the test and it is certainly useful especially for over 200 user online things become quite eloquent and at 400 😉 There are other mechanisms but according to the tests the eAccelerator is the most competent choice. I don't have much time for testing so I trust people 😀

http://www.youtube.com/watch?v = eJarZiMQaKA

Malmo is an extremely interesting new project – It is generally designed to protect hosting servers from malware on it, created by my friend and linux guru ShadowX. To clarify what exactly is meant – nothing prevents you from throwing at which hosting a nice c99 shell, for example, and if it is not well-tuned file system, nothing prevents the evil hahor to get access to shell. In general, the idea of ​​malmon is to monitor the upload of such pleasant misery and move them to a quarantine directory other than the document root.. The principle on which it works is quite pleasant – monitors for created new files in a folder that is set to watch the software and in the presence of some file that matches certain signatures sends it to the eternal hunting grounds. Something like antivirus software 😉 The script is written in python which makes it light, fast and flexible. To keep track of new files created, it uses the relatively new kernel mechanism inotify. Although the script is not yet officially a stable version of 3 days I have not had problems on a decently loaded server – one of the sites there is in the top 100 на tyxo 😉

I can keep pouring dry statistics and deep explanations of how the code works, But I will not do it. I will rather urge you to download it, test it and if you have suggestions to write to the author 😉 If you see bugs, write to him again, people are wrong and it is good to support each other.. Cheers!

Because I'm a unique jerk and I write terribly not sloppy and ill-considered code, I managed to leave my hosting machine without access for the whole evening. The problem turned out to be trivially stupid, but who cares in time.

#!/bin/bash -x
wget http://checkip.dyndns.org/ -O /tmp/ipaddr
IPADDR=$(cat /tmp/ipaddr | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>')
IPADDROLD=$(cat /tmp/ipaddr_old | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>')

if [ "$IPADDR" != "$IPADDROLD"  -a "$IPADDR" != "" ]
 sed -i "s/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/$IPADDR/" /etc/bind/neo2shyalien.eu
 /etc/init.d/bind9 restart
 echo "server localhost" > /tmp/nsupdate
 echo "zone neo2shyalien.eu" >> /tmp/nsupdate
 echo "update delete ns.neo2shyalien.eu. A" >> /tmp/nsupdate
 echo "update delete ns.neo2shyalien.eu. CNAME" >> /tmp/nsupdate
 echo "update add ns.neo2shyalien.eu. 38400 A $IPADDR" >> /tmp/nsupdate
 echo "update add *.neo2shyalien.eu. 38400 CNAME ns.neo2shyalien.eu." >> /tmp/nsupdate
 echo "show" >> /tmp/nsupdate
 echo "send" >> /tmp/nsupdate
 echo "" >> /tmp/nsupdate
 /usr/bin/nsupdate -k /etc/Kns.neo2shyalien.eu.+157+59417.private -d /tmp/nsupdate
 mv /tmp/ipaddr /tmp/ipaddr_old

This is already a fixed script that will not allow an error. In a moment I will explain where the problem was, now I will explain what the script does. At least I'm on a dynamic public ip. I have run the above script to check for a change in my address if it changes to change the machine settings and send information about my domain, that there is a change. Generally a trivial script, but in it I had made a terribly stupid omission. In the part where it is checked for change of address

if [ "$IPADDR" != "$IPADDROLD"  -a "$IPADDR" != "" ]

It used to be

if [ "$IPADDR" != "$IPADDROLD"]

So the line itself does the following, takes the 2nd IP addresses and checks them if they are the same skips if they are different updates. In the previous version I had missed a very important error for some reason my script had decided that I have IP = “” (nothing) and rewrote the configuration of my bind with an empty field and on the next change it can no longer rewrite the configuration correctly which leads to a lack of connection with the nameservr. It's stupid, isn't it?

Because I had a lot of controversy until I came to the optimal option – for Android on my HTC I decided to write a pretty detailed explanation of things. In this case I will go into specification for installation on the NAND of the phone, haret boot option I will not discuss it, although with him things must be identical.

1. Training – before we start we need to prepare the kernel with which we will flash the NAND chip and make it possible to boot directly on Android. If you are running Linux or Mac OS I recommend Atools-and the option if you have Windows NBH Editor-a is your panacea. Then download the last kernel from GIT-and I personally recommend the latest version 2.6.25. Works more stable than 2.6.32 and saves more electricity, disadvantage is the low transfer of the wifi adapter, which suits me. Then open the nbh file and apply the settings for your phone and droid version . Then save the new reworked kernel for your phone. And you put it on your SD card. It must be in kaisimg.nbh format so that if we have an SPL, we can flash our phone from the SD card.. There is a lot written about these things everywhere, so I will not discuss them. After flashing with the kernel in question, you can now say goodbye to Windows Mobile 😉

2. Android – Once we are done with the top the phone will start charging in console mode and will prompt us to hold the d-pad or the middle button on the front panel. With it we enter the boot menu from which we can install, update, reset, etc. our Android. In order to be able to install we must have a folder andboot in our SD card, it must have a file named androidinstall.tar.gz or androidinstall.tgz. After trying almost all Froyo versions I think it is the fastest and most stable Fat Free Froyo. I personally use it and have had almost no bugs, I will hope that its developer will try so hard in the future as well. It is wise to make at least one before you start installing 512 or a little more ext2 partition on your SD card where data.img will sit or part of the droid wiv which programs will be installed. The installation itself is trivial, you choose your system to be on the NAND and your date on the ext2 partition. You are waiting 2-3 min until everything is set up and you will return to the original menu. Select Quit and your freshly installed Android will start. From now on, dare and have fun.

3. A few words about other things – First of all, I recommend the Radio ROM to be version 1.65.xx version. Versions 1.7xxxx don't work as well. There is some trouble around them with the scope of reading contacts from your SIM card and so on. If you still want to test 2.6.32 the kernel is likely that your Android will not start due to the various parameters that the new kernel passes to the init system. In this case, you update the system by placing the archive here in the adboot folder and then from the boot menus select to update the system. The good thing about it is that it makes the system an idea for a faster wifi adapter to suck at a higher speed but it is not as stable as 2.6.25 which is not a small minus 😉 separately that with it the Fat Free Froyo cannot save the contacts from the SIM.