Jan 29, 2010
Jan 21, 2010
How to repair a broken YaST online update in SuSE 11.2
One of the last YaST2-ncurses packages renders YaST2 online update and software management in SuSE Linux 11.2 unusable. Online update just exists back into the menu. If you want to fix it, follow these instructions:
- Mount your install DVD. In my case it looks like:
mkdir /mnt.dist
mount -o loop /mnt/distro/opensuse-11.2-x86_64.iso /mnt/dist - Change path to RPM packages location. In my case:
cd /mnt/dist/suse/x86_64 - Restore original packages. In my case:
rpm -Uvh --force yast2-ncurses-pkg-2.18.4-2.9.x86_64.rpm
rpm -Uvh --force yast2-ncurses-2.18.10-2.1.x86_64.rpm
That's all. Now you can use online update. It will propose you yast2-ncurses fix, which you should install.
Avoid your personal "Aurora operation"
Yesterday I read a phrase that made me think a lot about the way how we develop software. The source was not in English and it is hard to make a precise translation. The phrase sounds like this: “Software will be always vulnerable while it is written by humans”.
Why did this phrase caught me? For several reasons.
Firsts, I immediately remembered many extensions that I saw in the past with trivial security problems. It is so easy to avoid them and yet people still write it insecurely.
Jan 18, 2010
Using XDebug helper plugin with FireFox 3.5.7
Recently my FireFox automatically updated itself and disabled XDebug helper plugin, which I use to debug PHP scripts with Komodo IDE. While it is possible to start debugging by adding XDEBUG_START_DEBUG=1 to the URL, it is not very convenient when debugging such framed applications as TYPO3 Backend.
There is no update for this plugin. Even worse: it is disappeared from the list of FireFox plugins. Fortunately I have it locally and managed to cheat FireFox to recognize this plugin as valid.
It is quite simple. Firsts, you need to shutdown FireFox. Next you need to go to the extensions/ subdirectory of your FireFox profile. On Mac it is in ~/Library/Application Support/Firefox/Profiles/ff3.default. In the extensions/ you will see xdebughelper@mail.ru and install.rdf inside it. Open this file in the text editor. You need to change two values there:
- set em:maxVersion to 3.*
- increase em:version
Start FireFox and you have XDebug icons in FireFox again!
Jan 6, 2010
Komodo IDE, XDebug and superglobals
Jan 4, 2010
Extracting text from HTML body
$result = '';
$regExp = '/.*<body[^>]*>(.*)<\/body>.*/is';
if (preg_match($regExp, $htmlContent)) {
$result = trim(preg_replace($regExp, '\1', $htmlContent));
}
return $result;
}
Small performance enhancement tip
Check if you have NSCD installed. NSCD is a caching daemon for DNS lookups. Even if you have HostnameLookups off in the Apache configuration, Apache still does look ups from time to time for internal reasons. If you do not have NSCD, it may take lots of seconds (especially if host does not exist). With properly configured NSCD it will be much faster.
Here is my NSCD configuration regarding DNS lookups:
