Well.Done (c) Radek Hulán [EN]

Zend Server CE (PHP 5.3) with SQL Server driver

18.09.2009

Running PHP applications on IIS is a very good idea especially since PHP 5.3 release, thanks to close cooperation between Microsoft and Zend, which brought us many Zend engine optimizations on Windows. PHP 5.3 can also (and finally) be compiled natively in Visual Studio 2008 or 2005, unlike old PHP releases which required Visual C++ 6.0 (released in 1998).

PHP on IIS is always using FastCGI interface, and should be combined with bytecode pre-compiler and code optimizer like Zend Optimizer+.  Zend Optimizer+ is part of PHP distribution from Zend, and is available free-of-charge as Zend Server Community Edition.

Running PHP on Windows also means you can use SQL Server 2008 database instead of (slow and unstable in my experience) MySQL.

Microsoft offers SQL Server Driver 1.1 for PHP on Codeplex, which is currently the best driver (considering both functionality and speed) to use for PHP <-> SQL Server 2008 communication.

There is one problem though. Zend Server CE is compiled using Visual Studio 2005 (VC8), while SQL Server Driver binaries are available only in VC6 or VC9. Unfortunately, VC9 extensions and VC8 PHP do not mix together. Fortunately, SQL Server driver source code is available on Codeplex, so you can easily compile it yourself.

Source code and compilation tools you need

category: PHP - permalink - comment: 1 [10.10.09 11:41]

Opera Unite tries to solve a problem that does not exist

17.06.2009

In my opinion, Opera Unite is doomed to fail.

Do you remember AllPeers project (Firefox extension for P2P file sharing) which debuted about 3 years ago? It is gone by now. Dead. R.I.P.

And there is only one reason for that - it tried to solve a problem which did not exist. Market for this extension was non-existant.

Anyway, as of today, Opera Unite is trying to resuscitate this dead horse again, by offering file sharing functionality in their browser.

But this time, not even with P2P functionality, but with an integrated web-server on your desktop!

Sending one file

Using any decent IM client means I can drag and drop file to conversation window and it is instantly being sent. I do not need Opera (Unite) for this, no need to copy and paste URL and send that URL to other party (which is done probably by IM anyway, so why not sent the file by IM as well?!).

So, Opera Unite does not offer any tangible benefits for one-time file sharing.

In fact, is is much more difficult to use and setup Opera Unite than doing simple drag&drop gesture with your mouse, and probably much less secure (remember, Opera Unite runs webserver on your own desktop computer).

Most people do use IM apps (Windows Live Messenger, Skype, etc.), and they've offered file transfers for ages.

Some of these IM apps (like Microsoft WLM) can even sync complete folders.

Sharing multiple files, syncing changes

Live Mesh

As for multiple or repeated file-sharing, using Opera Unite is again too much work and too little functionality.

No sync of changes like excellent file sharing utility called Live Mesh from Microsoft, no option for cloud hosting (so you cannot go offline and are forced to stay online), no automatic file transfers. Not useful for moving files between work and home computer.

Live Mesh gives you freedom, great functionality and ease of use. Opera Unite gives you a webserver. Huh?

When I would like to publish new photos with Opera Unite, my Dad would have to actively download it, and I would have to be online at the same time, running Opera Unite (of course).

With Live Mesh things are much easier - I simply leave files from my camera in my Images folder (being shared by Live Mesh), and Live Mesh magic takes care of the rest. Files are automatically synced to the cloud (this behaviour is optional), I can switch-off my computer, and when my Dad logges-in later on, he will see those images directly in Windows Photo Gallery, on his local hard-drive.

With Opera Unite, there is no cloud advantage (as with Live Mesh) and no changed files sync (as with Live Mesh).

Opera Unite is also not useful for exchanging and syncing documents between me and my customers on large projects (P2P or with a cloud).

Distributing files to multiple users

When distributing files to multiple users, Opera Unite approach is hard to justify. Instead of uploading your files once to a cloud, you have to upload them again and again and again, for each user individually.

In case of Live Mesh or Live SkyDrive, Microsoft takes care of all bandwidth, performance and cost issues (for free).

My conclusions

Frankly, I see many disadvantages of Opera Unite when comparing to existing products, and no advantage at all. Same as with (dead by now) AllPeers extension for Firefox. Sharing file or files with Opera Unite requires more work on both parts, not less, and offers less functionality.

People need to exchange (share) information, work on it, modify it, send it back, and not just passively download few files several times. Background service and optional cloud sync like Live Mesh serves these needs better, one-time file transfer is better served by IM clients (Windows Live Messenger).

Opera Unite tries to solve a problem that does not exist (it might have existed back in 1995, but not in 2009). Same as AllPeers did... R.I.P.

Is Mozilla Firefox secure (and advanced) enough?

18.07.2007

Mozilla Firefox was primarily designed as a browser that should compete with Internet Explorer 6.0. That was not a very difficult task, as IE6 was launched in 2001, and it was really obsolete already in 2004. Firefox ambition thus was not a big one, simply copy IE6 user interface, add Netscape rendering engine, add Google Search box (already known from Google Toolbar), and add tabs (already known for years from Opera).

And Firefox succeeded, now about 10-20% people are using it. We could say Firefox is the most famous copycat. Some advanced users value Firefox for its extensions, but this is a minority, most users install it because it closely resembles IE6 they know, and has some missing features (ActiveX), which make it arguably more secure (but less functional).

Most people installing Firefox never even open a new tab, they use and view the browser as another IE6. You may have noticed that "New tab" button is missing in toolbar at default Firefox installation. They use it simply because it is "in", and see many others doing it as well.

Yes, there are some advanced users, that use Firefox for different purpose, and that is extensions. Extensions are brilliant concept, but they still have many flaws in Firefox. Pro user needs to add 20+ extension to Firefox to make it a bit more powerful then IE6 (not even speaking about superior and fast IE7), and here is where problems start.

Firefox extensions are not tested as a complete package, they come from various independent developers, and can completely break the browser or another extension. They are also huge (potential) security risk, you never know if some extension is not sending out your credit card info.

category: Internet - permalink - comments: 9 [02.10.08 12:55]

Control mobile phone from PC - Pocket Controller Pro

18.07.2007

Microsoft Windows Mobile is (by far) the best operating system for mobile phones and PDAs. You have huge portfolio of commercial and freeware applications available, synchronization between Windows XP (using ActiveSync) or Windows Vista (Synchronization center) is easy, and new Windows Mobile devices by independent competing vendors are launched every day with latest innovations (3G, GPS, Wifi, HW keyboard).

For $35.95 your can add one more feature / advantage to Windows Mobile phones, and that is complete remote control from your PC, using mouse and keyboard, thanks to Pocket Controller Pro v6. Your Windows Mobile phone can be connected via USB, Bluetooth and/or Wifi.

Remote control your mobile phone from PC has many advantages. Installation and configuration of new software is much easier, and you can type SMS and MMS messages directly on PC keyboard.

This is what you see will see with Pocket Controller Pro and HTC Artemis connected:

Pocket Controller ProPocket Controller Pro - ovládání mobilu z PC
category: Windows Mobile - permalink - comment: 1 [18.07.07 15:46]

Apple iPhone - dumb and dumber?

16.07.2007

I am using Microsoft Windows Mobile phones for last two years, and will never go back to a non Windows  Mobile OS again. It does everything I need, and I mean everything. I have installed about 100 applications and games on it, and truly love it.

Windows Mobile Windows Mobile

We have also Apple iPhone on the market, which some people believe is going to be awesome. Or, at least, that is what Apple says. They claim it is revolutionary. Liars. The truth is iPhone is obsolete.

category: Apple iPhone - permalink - comments: 13 [03.11.07 16:17]

Fortron Epsilon GLN 600/700W - making it quieter

16.07.2007

Fortron Epsilon 600/700W GLN is one of the best power-supplies, reasonably priced, with well-designed internals, stable and quiet (considering it is able to deliver sustained power of 700W). Still, its noise level could be improved by using a third-party fan.

My home Intel quadcore PC is based on fantastic Stacker 830 case, using very quiet Noctua fans running at 800rpm for cooling, so I decided to install the same fan for Fortron Epsilon GLN power supply.

category: Other HW - permalink - comment: 1 [19.07.07 23:39]

Compile Apache (with SSL), PHP 5 and MySQL on Linux

15.07.2007

This article comes with a full reference on how to compile from source latest Apache 2.0.53 server, including support for SSL, PHP 5.0.3 as a module, and MySQL 4.1.10 database on a Linux. It was fully tested under SUSE Linux 9.1, SUSE Linux 9.2 and Fedora Core 3, but shall work with any Linux distribution (only on Debian you will have to change RPMs for proper deb packages).

Today, when almost every Linux distribution comes with a binary form of Apache 2.0.x, PHP 4.3.x and MySQL 4.0.x, it may seem a bit unnecessary to compile these, but, if you want some special configuration, latest components, or simply tune performance of your Apache, PHP and MySQL, compilation from source is the only possibility.

Basic system description:

PHP 5.0.3 will be compiled with support for: bz2, cpdflib, ctype, curllib, dom, ftp, gd2, freetype2, gettext, libiconv, libxml, mbstring, mysql, openssl, pcre, posix, session, SimpleXML, SPL, SQLite, tokenizer, xml, and zlib.

Apache 2.0.53 will be compiled with support for mod_access, mod_auth, mod_auth_digest, mod_deflate, mod_env, mod_headers, mod_setenvif, mod_ssl, mod_mime, mod_imap, mod_alias and mod_rewrite.

category: Linux - permalink - comments: 56 [03.11.08 20:03]

html2pdf - convert your XHTML to PDF easily

15.07.2007

I've created html2pdf PHP class, which allows one-click conversion of XHTML to PDF. It is an extension of FPDF class, found on http://www.fpdf.org.

Basic HTML2PDF features:

  • support for bold text, italics, underlined text.
  • support for headlines <h1>, <h2>, <h3> and <h4>.
  • support for linked and embedded images.
  • basic support for tables.
  • full support for lists <li>.
  • full support for <blockquote>.
  • support for pseudo-tags <red>, <blue>.
  • <pre> will be displayed using Courier font, other text with Times New Roman font.
  • support for <br>, <br /> and <p>.
  • support for <hr> and <hr />.
  • exported PDF filename is created by ascii characters of article title.
  • temporary files are deleted after 60 minutes.
  • document header is created with article title, article URI, author, and publishing date.
  • document footer is created with current and total page numbers.
  • built-in support for iconv (character conversions).
  • supplied fonts Times a Courier, in CP1250 encoding (can be used for text in iso-8859-1, iso-8859-2, cp1250, and cp1252, with iconv).
category: PHP - permalink - comments: 5 [21.02.08 20:00]