Tuesday, June 21, 2005

running PHP4 and PHP5 parallel

I have installed both versions on my development server and am running two instances of apache, one for each. Now this is running since last year and i have got no problem what so ever.

Now i have got this new Project, which is a relaunch of a website. The site, as you can imagine, is written in php4, and is pretty big. So they decided a step by step relaunch, beginning with its shop system.
Naturally i decided to write the new shop module in php5, because the data is too sensitive to handle it just in php4, no offense intendend.

Now we have got the Problem, the administrator of their server is not really a technical genius.. in other words, he is able to keep the machine going, but has abolutely no idea how to install php5 parallel to php4.

While my solution (2 instances of apache) works fine for me, i don't think it is the solution for the customer, so i looked into the net and found a real cool solution. (in a matter of seconds ;-)

This solutions works like this: They install both PHP versions (one, php5, from source) and configured apache that it will use php5 in the directory you like, by enabling mod_action.

Real cool! Here is the link

Friday, June 17, 2005

Hitchhikers Guide

Yesterday i saw the movie. Well i have to admit i have not read it fully, i am currently in the end of book four, but that does not matter for anybody could see the mix they have made.

I did not expect to see a complete movie with all content from the book inside it, but i did thought they will at least try to avoid changes in the story.

Although i already was a bit startled about Arthur Dents moves in the book (for example: Why he left the Heart of Gold to be on Krikket), and i liked that Arthur and Trillian got together.. but they completely blowed Zaphrods Character by given him this dump quest about Deep Throat...

What did they do with Zaphrods Heads anyway, i mean they should be side by side and not one below the other... And why did they have to mumble so in the beginning.. if i had not read the book, i would not have known what the hell they have talked about...

To summarize all: The Beginning was ok, but in the middle you know that it will not be like you hoped for and at the end it was a little weak. But i did like marvin!

MySQL relevance in FULLTEXT Search

While searching for a way to implement a Textsearch Engine into a clients website, a friend of mine told me about MATCH .. AGAINST().. and the relevance output.

Here the MySQL Reference Manual for it.

Good for us, all texts where in a mysql database and i added the needed index to all tables we wanted to search through. Then i programmed a php algorithm which searched all databases using the match against statement and put them all into one Array, sorted by their relevance.

Our Result Algorithm then took the Array, and prepared the text for output by cuting it and highlighting the searched word. (using css ;-)

Naturally i wanted to add a Percentage to it, but was not sure how to calculate the right one.
After searching a while in the Internet i found that source.

In Short:
a = the relevance of the current Array Value.
b = highest relevance of the search

percentage = (a / b) * 100

The first one gets 100 Percent, and then it drops in direct proportion...

Tuesday, June 14, 2005

Battlefield 2 Demo

I just downloaded and installed the demo. Since i first saw some footage, i definately wanted the game.
This morning i was able to test the Demo for some minutes, enough to get a first impression: WOW! I mean, i thought the game will be cool and so, but i definetly thought although my computer is not the weakest, i will have to lower some details, or it will at least bucking or laggin....

no way, it runs as smooth as btf vietnam...

And for that i am really glad. They did their homework and i will buy the game as soon as possible.

Monday, June 13, 2005

OpenOffice vs. MsOffice

Matt did a performance test between Word and Writer.. it is kind of interesting since Microsoft decided some time ago to save the data also in the XML Format.

Here is the Site.

Friday, June 10, 2005

CSSBug macIE: space in classname

If there are Spaces in classnames, macIE uses an internal css class called .infobox.
So if your document contains a css class called .infobox, macIE will use it ;-))

Here is a TestPage.

Tuesday, June 07, 2005

debian sarge released stable

After several years and a week later they finally managed to release sarge as stable....
My first action was to update my woody/stable debian installation to sarge...

Error?? ... ok .. look into the sources.list... ahh.. some servers are not up to date.. ok change it... all worked fine!!! ;-)

Then i did something i don't like.. i let them update everythink... waited and then rebooted the server..

If everythink worked fine it should get up without problems, if not, i will not get any sleep today...

And then everythink worked just perfect....

Today i will update my sarge/testing chroot installation to etch...