You are currently browsing the IT category
§ June 21st, 2007 § Filed under IT § No Comments
PHPUnit 3.0.6 (with PHP 5.2.2) can’t even load a file!
$ phpunit UnitTest
X-Powered-By: PHP/5.2.2
Content-type: text/html
PHPUnit 3.0.6 by Sebastian Bergmann.
File “UnitTest.php” could not be found or is not readable.
Let’s see where it looks for my (definitely existing and readable) UnitTest.php. Add a quick debug printout starting with KS: into /usr/local/lib/php/PHPUnit/Util/Fileloader.php:
$ phpunit UnitTest
X-Powered-By: PHP/5.2.2
Content-type: text/html
KS: wd=/usr/local/bin, filename=UnitTest.php
PHPUnit 3.0.6 by Sebastian Bergmann.
File “UnitTest.php” could not be found or is not readable.
What’s that?… I don’t believe my eyes. Does it really look for input ini /usr/local/bin?
$ sudo touch /usr/local/bin/UnitTest
$ phpunit UnitTest
X-Powered-By: PHP/5.2.2
Content-type: text/html
KS: wd=/usr/local/bin, filename=UnitTest.php
PHPUnit 3.0.6 by Sebastian Bergmann.
Class UnitTest could not be found in UnitTest.php.
I’m not absolutely alone with this, there is a recent post (18.6.2007) complaining about the same issue. Maybe this is a new bug in PHPUnit? Let’s try the latest beta release of phpunit from http://pear.phpunit.de/get/, installing manually as said in phpunit manual section:
$ phpunit UnitTest
X-Powered-By: PHP/5.2.2
Content-type: text/html
PHPUnit 3.1.0beta4 by Sebastian Bergmann.
File "UnitTest.php" could not be found or is not readable.
OK, quotes are replaced with ", but the file is still not found. What else could be done? Rollback to a previous version, phpinit 3.0.5. Alas – result is the same!
Update: This misfortune is experienced on RedHat Enterprise Linux 5. On Ubuntu Feisty, PHPUnit works out of the box. So this is likely an installation problem, not a problem of PHPUnit. Aha! I had some old PHP on RHEL machine, and installed newer version in /usr/local. Let’s revert back to the stock PHP:
$ phpunit UnitTest
PHP Warning: require_once(PHPUnit/Util/Filter.php): failed to open stream: No such file or directory in /usr/local/bin/phpunit on line 40
PHP Fatal error: require_once(): Failed opening required ‘PHPUnit/Util/Filter.php’ (include_path=’.:/usr/share/pear’) in /usr/local/bin/phpunit on line 40
Now even PHPUnit is not found; let’s see with strace where the PHP is looking for it:
$ strace -f phpunit UnitTest | grep Filter.php
4471 open(“/my/current/work/dir/PHPUnit/Util/Filter.php”, O_RDONLY) = -1 ENOENT (No such file or directory)
4471 open(“/usr/share/pear/PHPUnit/Util/Filter.php”, O_RDONLY) = -1 ENOENT (No such file or directory)
4471 open(“/usr/local/bin/PHPUnit/Util/Filter.php”, O_RDONLY) = -1 ENOENT (No such file or directory)
But my PHPUnit was installed by pear in /usr/local/lib/php. This directory is not searched by default. We have to add include_path = /usr/local/lib/php statement into the php.ini, used by the PHP installation. After that, the script subject to test is not any longer searched in /usr/local/bin, and my long-awaited test finally works.
§ April 17th, 2007 § Filed under IT § 1 Comment
We desperately needed a scanner. Also the old printer got almost unusable, leaving black strips on the paper after an ink cartridge leaked and smeared the ink on all the plastic foam inside it. The decision seems obvious: multifunction device.
Of mainstream printer manufacturers, only Epson and HP are friendly to the Open Source and thus are supported under Linux. We had a price tag and wanted to get the box from a local shop, as the need was really urgent. This made the choice very easy: HP Photosmart C6180. It is a printer, scanner, copier and fax.

Under Windows, scanner “just works”. Printer works, but the driver is poor. I could not do lots of things with it such as:
- print borderless A4 image (datasheet says the printer can do it)
- print an image in a particular size in a particular place of the page
Driver presents strange options, such as setting all four margins for an image. How can you have all the four of them, I do not know.
Now the interesting part: support under Linux.
HP printers are supported with hplip. My Ubuntu Edge had a version, which did not contain support for this printer model. I downloaded sources and built the newest hplip; compilation went OK, except that it required net-snmp, which also was not in the distribution and had to be installed manually. Fortunately the chain ended at this point.
USB connection worked “out of the box”. Cups web interface saw the printer in the “add printer” dialog. After its addition, the new printer was present in all print dialogs.
WLAN connection worked practically out of the box, with instructions from Ubuntu forums.
But that did not make me completely happy. From what I see this late evening:
- GIMP must use generic Postscript driver. So, there is no any fine control over the printout. Guys, I’d not call this “perfect support” without selection of:
- Paper type
- Resolution
- Print quality (draft/standard/high)
- Option to print borderless
- Other applications, which use the hplip driver present the same interface as Windows. So they are missing the features of gimp-print drivers – especially scaling and positioning of the image. Borderless printing does not work neither: about 5mm borders are still left, and the image is simply cut HPLIP site gives instructions, but they do not work at all.
The scanner is not recognized. Xsane does not see any device, although it has hplip configured.
Continued: After upgrade to Ubuntu 7.04, scanner is recognized! Thank you Ubuntu team.
§ February 14th, 2007 § Filed under IT § No Comments
Disclamer: I *was* affilated with Nokia.

1. With no SIM, you can’t turn off the sound. I do not have an extra SIM at the moment, and I can’t stop disturbing my neighbours with beeping keys. I know that the “profile” is stored in the SIM, but that does not make me happier.
2. It comes with some pre-installed SW, which I can’t remove. I’ll never need these “business catalogs”, but the icon takes the screen space in the most frequently used menu, and there’s no option to remove it.
3. I had some SW installed in the memory card. After phone re-flashing, that SW seems to be missing… no, just taking the memory. But not available for re-installation. The only way to make things consistent seems to be the reformatting of the memory card – the provided file manager (which is hidden in the “office” menu, by some reason) does not show these apps on the card.
4. Help system is fantastically idiotic. I tried to read help 3 times; all the three times it said “in order to save your settings, select save settings from the menu”. There are things which are not obvious to me, for example, meaning of tiny icons. Colleagues told me the lock on top of bold X means “connected to encrypted WLAN”, key inserted in a hanging lock stays for “registered with SIP server” – so intuitive. It is not said anywhere in the help.
5. I’d like to have at least the following applications: usable file manager, screen capture, plain text editor. None is preinstalled. There is a menu “Download applications”, which opens the browser at http://ea.mobile.nokia.com/content/spin/ea/E61/en/app. That useful page provides two applications: “Handy Expense” and “Quickoffice”.
6. Menus have option to be displayed either as icon grid (12 icons fit on the screen), or as “list” (5 list items fit). I’d like them to be more tight, at least smaller icons or just text; OK, maybe I’m expecting too much for 400€ device. But some menus – such as “Tools -> Settings” – are shown only as “list”; probably to practice scrolling.
7. Web browser. It has some nice features and it renders pages pretty well. But:
- While the page is being downloaded (which can take long for a mobile device), half of the menu is disabled. You can’t zoom/unzoom, toggle images on/off – have to watch the unreadable page until it downloads completely.
- Menu items “(in/de)crease image size” also (in/de)crease the font size. Good that with several more keypresses fonts can be returned back into the discernable state.
- No option “open link in new window”.
- No option to save the page!
- When loading a very long (1MB) text-only page, I got message “Not enough memory”. (The phone has 64MB of internal memory.)
8. WLAN connectivity is very poor. I have a number of WLAN devices at home, all work fine, but this one says “No WLAN network found” two times out of three when I try.
Other people’s rants:
Of course this does not mean that the phone is “bad”. First, it has many nice features (I’d point out nice rendering of web pages; not a surprise as it is based on KHTML) – look for them elsewhere. Second, no matter how many problems it has, other smartphones may have even more.
Update 10.7.2007:
- I’m receiving a file via Bluetooth. The “messaging” application can’t open it unless it is one of “known types”, and there is no option to save it anywhere into the filesystem! You can “save to folder”, but the choice is only folders in the “messaging”, which is a filesystem on its own.
- I’m writing a note. I can not save it anywhere neither. It stays in some place called “Notes”.
- The stock file manager is simply a shame. The working alternative I found is Y-Browser by Jukka Silvennoinen.
§ January 26th, 2007 § Filed under IT § No Comments
I did not have to spend more than 30 seconds at MS Windows screen for several years. Now I’ve spent several hours.
1. In IE, you can’t stop flicking animated images.
2. In IE, you can’t force all fonts to be at least 12 point size. IE thinks you can not be trusted to select the font with which you browse.
3. In IE, you can’t say that you want resize and navigation controls in *all* new windows. Designers of kewl web sites write “toolbar=no” in their kewl java script. I did not even know about such stupidity before.
4. Here and there you get “modal windows”, from which you can not switch to any other window. If you need to look in another window for the input – no way.
5. Here and there you get windows, which you can’t resize. Selection list of >200 items is crammed in 1 inch vertical space. Was it difficult to allow resizing?
None of these issues apply to the operating system itself, it is all about applications (as anything a user can see on the screen). But the operating system somehow influences the culture of these applications.
There was one thing which I found better though. Default fonts are nicer than what I’m used to in Gnome and KDE.
The practice of locking mobile phones to a single mobile provider has become quite annoying in the United States. While the rest of the world can freely change providers by simply swapping out a SIM card, US customers are usually stuck with multi-year contracts and locked phones. Apple is continuing this tradition by locking all iPhones sold in the US to the Cingular network.
Source: 10 Ways The Nokia N800 Is Better Than Apple’s iPhone
Newer Entries »