Photos:

China pictures processed

 
0%
 
2008.11.04 @19:20 

IT coincidences

IT coincidences

During the first manned mission to land on the moon : Apollo 11, a problem occured on the computer during the descent. The system was overloaded with information from a radar and completely blocked returning errors 1201 and 1202 until some kind of reboot / failsafe operation luckily gave enough "room" for the humans to still use the computer at an acceptable degree.

Funnily enough one of the other error code in the system was "error 00404" which at that time was shorthand for "Inertial Measurement Unit orientation unknown" which means that the craft does not know where to go, implying more or less that the user is lost...

See this page for the full story and an incredible wiki on all the instructions of this computer.

Coincidences informatiques

Coincidences informatiques

Pendant la première mission humaine d'exploration de la lune : Apollo 11, un problème est apparu sur l'ordinateur durant la descente vers la lune. Le système était surchargé de données venant d'un radar qui ne fonctionnait pas correctement et l'ordinateur bloqua complètement retournant des erreurs 1201 et 1202 ("plus de place") jusqu'à ce qu'une sorte de reboot / mode sans échec leur permit d'avoir juste assez la "main" pour pouvoir continuer à utiliser l'ordinateur jusqu'à l'atterissage.

Un détail amusant est qu'un des codes d'erreur définis dans le système était "erreur 00404" qui correspondait à l'erreur (grossièrement traduite) "L'unité de mesure d'inertie n'a aucune orientation" ce qui en gros veut dire que le vaisseau ne sait pas où aller, et qui ressemble beaucoup à nos erreurs 404 modernes : "la ressource est introuvable"...


2008.09.04 @13:53 

Some News

Some News

Apart from the small precedent article, modified during work, I haven't posted lately.

The good news is that it is because we found a house !

The "bad" news is that since the finding I got very busy to organise everything and then moved there... and we still dont have any internet connection there... And I'm going back from work enough late for Agnès to probably avoid spending more time at the office writing new stuff

Anyway I'll be back, and yes mathilde and others, I hope you haven't dropped the ball, there will be some news and ... hopefully pictures !

Quelques Nouvelles

Quelques Nouvelles

A part le dernier petit article, écrit pendant le boulot car le fix était nécessaire urgemment, je n'ai comme qui dirait pas bloggué grand chose dernièrement.

La bonne nouvelle est que c'est parce que nous avons trouvé une maison !

La "mauvaise" est que depuis que nous l'avons trouvé, je me suis retrouvé trèèès occupé pour organiser les choses le plus vite possible et depuis nous avons emmenagé là bas... et nous n'avons toujours pas de connexion internet malgré une demande à free depuis 1 mois ! Et vu que je reste suffisamment longtemps au bureau pour des préoccupations bassement économiques, je doute qu'Agnès soit enchantée si je reste ma soirée pour blogguer

Donc oui mathilde (et les éventuels autres), j'espère que tu n'as pas laissé tomber surtout au vu des articles terriblement geeks qui ont jalonnés ces derniers mois car il y aura j'espère bientôt matière à écrire... et potentiellement à photographier !


2008.09.04 @13:47 

Postfix virtual users forwarding Update

Postfix virtual users forwarding Update

I've had a bug in my email transport layer : if multiple emails for the same virtual domain are in the To: or Cc: than it delivered only one of the recipient since I didnt know that multiple emails could be passed on to the same transport layer call sadly, thought maybe dumbly that it would be called several time with each address, gulp.

So the page has been updated for the new code, which handles errors sent to the users better as well if one of the account does not exist while the other recipients are served as expected.


2008.06.12 @13:27 

DEFLATE problem with IE6

DEFLATE problem with IE6

Since a while now I had some troubles with my IE6 at home and sometimes elsewhere (compared to IE7 at work) on some of my simple applications.

Why simple ? Because they are not complex in any kind or heavy and they are very light as html pages.

For example, this blog you're reading is heavier on the frontend (complex skin, javascript and lots of stuff to load) but the backend is very very light since I didnt care enough to build something shiny for my own usage.

And under IE6 from times to times (completely randomly) IE didnt want to follow links but as it is only on my backend I didnt really look into it for a while.

Pardon me ?

Yes you have read correctly, even if internet is all about links - isnt it  ? -, when I clicked on a simple GET link, IE6 starts to download and stops on a white page, even the url in the navigation bar url has not changed !

When sniffing the traffic, one can see that the request and response have been correctly done and still IE6 does not want to render the page.

If you read this article and you have the same kind of trouble here is why and how to fix this.

Why ?

Sniffing the packets gave me the opportunity to see that my new webserver where others developers are working on was now using the Apache module mod_deflate.

If you have looked on internet you may have noticed that IE6 and below have well know problems with big javascript being served and cached.

Why specially javascript files in these reports ? To be honest this seemed a bit weird but I havent found any other reports apart the classic double compression problems which was not the case here.

After a lot of trials and errors I've narrowed down that the problems are happening randomly when :

  • the OutputFilter DEFLATE is active (beware that even if you activate it only with "AddOutputFilterByType DEFLATE type" this will have weird results since Apache does not always know which content-type is the page you're working on).
  • possibly the usage of sessions or custom headers in PHP may force to flush the cache with some Cache-Control headers
  • and the fun thing is ...  when the page you processed is tiny, less than 10k. It doesnt seem to appear when the page is bigger.

After fixing the problem I actually found this report from microsoft.

I dont know if this is the same problem but this looks pretty close except that I definitely had the troubles on at least two different IE6 and both were SP2 and patched with the latest updates... so no this does not seem to be fixed.

The solution

Since your users may not want to all update to firefox or IE7 you may have to :

  1. Either disable totally the output filter deflate on your site since I dont think this is related to PHP, PHP here is correctly sending the headers which are totally valid. It's IE6 the problem with gzip encoded data.
  2. Or more cleverly conditonnally disable it only for IE with : BrowserMatch "MSIE 6" no-gzip dont-vary so only IE6 will not have gziped content.

 


2008.05.03 @15:46 

Le début du bonheur ?

Le début du bonheur ?

Week end à loèche-les-bains. De 4 jours, tant qu'on y est.

C'est la fin de journée, le petit et la maman sont couchés et le silence est total. Le salon de l'appartement est très grand, la vue du coucher de soleil sur la montagne devant la terasse est enthousiasmante et j'ai un sofa bourré de coussin pour moi tout seul avec un bon* livre et une barette non pas de "chocolate" comme dirait de jeunes espagnols mais de kinder riegel - maxi en france (sans publicité aucune, il faut reconnaître que leurs produits participent à l'épanouissement de milliers d'enfants, de pas mal d'adultes reconnaissons le et ... de quelques dentistes).

 

* "Et si c'était vrai" de Marc Levy (2000).

Le fameux 'bouquin' dont tout le monde a parlé et qu'on avait trouvé à 2 francs dans un stand "Caritas" (association suisse qui entre autre revend des objets qui leur ont été donnés pour financer des programmes sociaux). J'ai donc fini par le lire, intrigué par la sucess story du premier livre de Marc Levy qui le fit définitivement changer de carrière. Après tout c'est un ancien informaticien (il a participé à/lancé du moins quelques entreprises de technologies), il doit bien y avoir quelquechose d'intéressant dans ce revirement complet de choix de vie. Commencons donc par son livre, enfin bouquin, car il le dit lui même ce n'est pas de la haute littérature, c'est de l'entertainment.

Et son honnêteté est louable car c'est vraiment très léger : on est quand même presque étonné que le livre en ait eu un ... de prix de littérature. Cela n'empêche que ca se lit bien mais on a vraiment l'impression de lire (j'allais dire "voir") un soap-opera américain ou une comédie sentimentale hollywoodienne. Le livre a d'ailleurs bien sûr été adapté au cinéma (les droits ayant été racheté rapidement par Spielberg - oui quand même, il saute sur tous les bons livres dès qu'ils se font remarqués comme "Flag of our fathers").

On est donc véritablement devant un écran : les personnages sont à peine décrits, les dialogues concis, empruntés au visuel, il y a le faire valoir (paul) et plein d'autres techniques cinématographiques. Pour être tout à fait honnête on se prend bien au jeu malgré des passages qui ne frôlent même plus l'hilarité gui-gui-mau-mau-ve tant cela colle aux dents : le début à la urgence encore plus moralo-pas-t'éthique que l'original ou le flashback avec sa môman d'une mièvritude et d'un manque d'originalité à battre des records de 0 pointé dans une rédaction de 6ème.

Mais le reste fonctionne pour peu qu'on n'aime pas lire, pardon se prendre la tête : les personnages sont attachants, l'intrigue accroche suffisamment et les dialogues savoureux c'est à dire une vraie sitcom (traduction francophone de soap opera). En fait ca donne surtout envie de voir le film, en effet les adaptations de romans au cinéma sont souvent un peu décevantes puisque le medium ne peut rendre la densité des personnages et de l'intrigue d'un livre mais ici on a vraiment l'impression de lire un scénario de film et les prémices de son storyboard. 


2008.04.29 @20:07 

WDog - Daemon Watchdog 0.7 release

WDog - Daemon Watchdog 0.7 release

After months and months being unable to release any code to the open source community, at last I had some time to release a piece of software !

This is the first version (0.7) to be released of a program called WDog : Daemon Watchdog and coordinator. Even if it is considered BETA I actually wrote and used similar versions of the same concepts for the latest years.

Licence is LGPL.

It has its own page here.


2008.04.27 @17:24 

XHTML + CSS Checkup

XHTML + CSS Checkup

You may not care... and you should certainly do !

I've spent several hours to "finalize" (as if it was possible in the IT world) the layout and the validation of the HTML + CSS. Not that it was hugely messy before but I never really tried to validate them precisely. I needed to code some h2 and h3 layout and since then I revamped what was not really compatible before.

As you could see... doesnt change anything.

Nice job. That was useful !

Yes, but still. While it was not too bad before (I wrote the code with the accessibilty in mind and the latest technics in 2005), it's always a good thing to improve the HTML semantic after a long time + the whole accessibility of everything by doing a second bunch of tests. Even if sometimes I'm really wondering WTF our lords of the W3C think sometimes. For example I wanted to stop being XHTML transitional (well after all it has been years now...) and start being strict. While 90% was already strict and 9% quite not too much of a hassle to do... There are some stuff like why the hell can we not use <ol start="4"> ? Will XML die out of it ?

There is indeed a new way to code numbers but lets be honest it doesnt really work on some of the latest versions of the main browsers so dont even think about it for the older ones... and the point is when this will be doable by FCK or other wysiwyg editors ? Not sure it will ever do. (ever = couple of years in IT)

Another thing as well is that you cant use the - yes ok it's evil - power of "document.write" javascript method during the loading of a page. Well actually it is not the XHTML1.1 strict that forbids it I think, it is the fact that you're more than welcome to drop the content-type text/html to application/xhtml+xml.

Well if you do that, most of the stuff will work (after quite some work)... but a lot of useful jack-of-all-trade tricks will just stop working. So for now on, instead of having to complexify all my javascript call, I'll stick to transitional and text/html.

Sorry, I tried but what matters most is the website to work, not to comply strict rules that are sometimes quite arguable...


2008.04.06 @22:18 

Postfix virtual users forwarding

Postfix virtual users forwarding

I've reinstalled completely my mail server with :

  • postfix
  • dovecot
  • ClamAV
  • ClamSMTP
  • postgrey
  • spam assassin
  • squirrelmail

Following these great articles. By the way in the first article, be sure you changed ownership of /home/vmail and everything below (domains etc...) to the vmail user or at least for him to rwx. If not your email will bounce to the recipient with the corresponding error message (something like "file or directory not found").

Everything worked as expected and quite quickly under ubuntu I must say... until I wanted to give to my users the same forwarding possibility as before (with qmail). With virtual users for some obscure security reasons (??), you cannot use the .forward (or .qmail) files !

"This agent was originally based on the Postfix local delivery agent. Modifications mainly consisted of removing code that either was not applicable or that was not safe in this context: aliases, ~user/.forward files, delivery to "|command" or to /file/name " from the postfix documentation.

Well in your /etc/postfix/vmaps you can specify redirections (john@doe.com -> johndoe@gmail.com) but you cannot save the email and forward it to one or more addresses like we often do for small mailing lists on "general" email addresses such as "contact@example.com"

As it seems it is not that easy to find a solution to this surprisingly bigger-than-I-thought small problem ! I haven't found  anything about this on internet. It's probably resolvable if you choose to store your emails in mysql (although I didnt try) but I like the old filesystem style better, easier for external scripting and it doesnt bother the database.

So I wrote a transport layer who does this. I hope it could be useful to someone.

Features :

  • no need to install an external program and should work with any postfix/imap/pop3 installation
  • deliver mails locally and/or forward to as many as addresses as you wish
  • supports aliases
  • if you use spam assassin (or another antispam which follows the same marking rules), the script can dispose automatically of your spam (delete or putting them to a server blackhole directory)

To install it :

  1. edit  /etc/postfix/main.cf and change : virtual_transport = mydrop
  2. comment your transport_maps line if any
  3. edit  /etc/postfix/master.cf and add at the end (there should be no spaces at the end of the lines)
  1. put the following script in /home/vmail/mydrop.py  and configure if needed the options at the top
  2. chmod +x /home/vmail/mydrop.py
  3. restart postfix with:  /etc/init.d/postfix restart

To use it :

By default it will deliver to the /home/vmail/domain/johndoe/ directories as before.
At any time you can create a ".qmail" file in each of the account's root (such as /home/vmail/domain/johndoe/) and as per the ususal .qmail files you can use on each line either "&johndoe@gmail.com" to forward to this email or "./Maildir/" (case insentive) to deliver locally. Example to forward to 2 addresses and keep locally :

 Let me know if you have any questions...

Note : you need to have all your domains and users to be in lowercase in your directories and your vmaps or you wont be able to receive emails in capitals.

[NOTE this has been updated on 4th of september 2008 to fix a bug] mydrop.py script :

 


2008.02.26 @22:02 

And you, what's your excuse ?

And you, what's your excuse ?

Why aren't you an artist, a scientist, a hero ?
Dont you feel the urge to be more than you, but no more than anyone ?
Dont you hear further than the noise of living ?
Dying of being average, simply replaceable copycat.
Arent you tired of your mechanical reactions ?
Dont you see the unbearable mighty numbers ?
Everything's temporary, transiting bodies and futile hapiness
Could you be more, do you have what it takes ?
Would you be able to salt reality ?
To deliver something new.
To create, invent, inspire.
Extirpate the divine out of you.
Build a death with a meaning.
To let the place tidier or cuter.
Dont you smell the fear of your own destiny ?
If life's a bitch, who's creativity ?
Craving to be high but you're too heavy.
Addicted to the very instants tasting god in your veins...


2008.02.11 @09:31 

PECL and PEAR memory problem

PECL and PEAR memory problem

if you had like me this kind of problem when trying to install or uninstall a package with PECL or PEAR:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 16 bytes) in /usr/share/php/PEAR/Registry.php on line 1012

Than your version of php is older than 5.2.0, either because you didnt reinstall it for a while or because you're under ubuntu for example.

After this version they figured out that the memory limit by default in PHP is 8M, which is very low, so probably you have all figured out how to increase this value in the php.ini !

Yeah but pecl and pear are not using the php.ini sadly, not even the "cli" version that you have under ubuntu or other installation. It is just PLAIN DEFAULT values.

So the trick is to edit the pecl script which is locate here under ubuntu (at least 6.10) :

/usr/bin/pecl

edit the last line where << exec $PHP ... >> is written and add << -d memory_limit="-1" >> just after $PHP, this should look like :

exec $PHP -d memory_limit="-1" -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 $INCDIR/peclcmd.php "$@"