Montagne, Informatique & Pensées...

Nouveaux fonds de carte IGN

publié le 29/06/2016

Pour ceux, qui comme moi passent du temps sur Geoportail, vous aurez remarquer que petit à petit les nouveaux fonds de carte arrivent. Pour ma part, je regrette que ces nouveaux fonds de carte n'apportent rien de plus et dégrade même la lisibilité des cartes : Pictogrammes trop présents, couleurs criardes et tracés trop imprécis des sentiers balisés.

Juste pour rire, on constate même que ces fonds de carte présentent une même erreur que je n'ai jamais constaté sur les anciens fonds de carte. La carte en question : Chartreuse Sud, les lignes de niveaux disparaissent carrément par endroit pour un saut dans l'espace temps !!!

*** Petite correction : après vérification sur une carte papier, cette erreur était bien présente auparavant. Tout juste était elle un peu moins visible... ***

IGN fonds-de-carte saut-spatial

Command "dump-autoload" is not defined

publié le 04/11/2015

In order to optimize the way I develop, I recently started writing artisan commands. It is a very good way to accelerate a lot of procedure that were mostly based on copy/paste/replace.

Today I stumbled upon a small problem, I wanted to dump-autoload after some files got created. According to the documentation all you have to do is :


Except that it seems that dump-autoload can't be called this way. After some search over the Internet, It seems I'm not the only one that has this problem but nobody had a solution other than using exec (gloups ...). Looking for an answer I greped the vendor directory in search for references of dump-autoload or dumpAutoload. I found an interesting one in laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php on line 81.

The solution is simple inject Composer in your command

    public function __construct(Composer $composer)
        $this->composer = $composer;

Then call the dumpAutoloads method of composer :


That will do the trick.

laravel-4/5 artisan dump-autoload

Laravel : Can't authenticate because sessions do not persist

publié le 12/06/2015

Today was a useless day !!! I spent 3 hours looking for an error that should have generated a HUGE error had I been doing good old PHP.

Don't misunderstand me, I do love the PHP I use for my applications, Laravel is just perfect as an Angular JS back end, Eloquent is simply the best ORM ever and I usually have no problem. That said, let's get down to today's problem.

My wife's planning manager was broken, she could not login in any more (nor could I By The Way). I started searching for the source of the error. After much googling I could not find anything that explained my problem. Most strange, the application was working on my computer but not on the production server.

After some debugging, I found out that sessions seemed not to persist. All I had to do was to find why. Digging deeper and deeper inside Laravel, I understood how the file session manager works. Apparently some guy came up with the idea that PHP Session were crap... I never had problems with them but I do not doubt that anything inside PHP could be made in a better way. This guy decided that this system should be replaced by a custom session manager storing files on the server (in the app/storage directory). But this still required to store the session id in a cookie (just like PHP does with sessions).

In order to do this, headers have to be sent... And any content is sent before the header : THERE SHOULD F...ING BE AN ERROR because you have requested the system to do something it cannot do. At this point comes the framework that caused my most numerous and lengthy nervous breakdowns : Symfony. Laravel uses parts of Symfony and in this case, It uses the HTTPFoundation classes. Here is the code that causes the problem :

public function sendHeaders()     {
      // headers have already been sent by the developer
      if (headers_sent()) {
            return $this;
Of course it may be logical to say that if the developer has chosen to send himself the headers, this method should not be called. But the fact that the headers have already been sent does not mean that it was the choice of the developer... It may have been an error (just like it was in my case) or he may have wanted to have sent a single header before the standard ones... In fact what bothers me the most, here, is the fact that something that should have at least generated a warning or a log is ignored silently !

It shows clearly that any warning on something that seems unimportant should really be passed to the developer (in dev environment at least). This principle is used by Laravel in all its specific code, it shows ugly error screen for warning or notice that would in production not even be noted forcing the developer to produce clean code.

The only solution I have if you want to be spared the 3 hour search and headache is to put an error_log before the return $this, just to show in the logs that this situation may be logical but may also be a big problem.

laravel symfony session authentication

Git Fatal Error

publié le 05/02/2015

Even though many of my customers don't even know what a versionning system is, I like to work with them. So, I end up initing projects only on my local workstation. That allows me export only the modified files without being forced to remember the modified files and the modification made.

On my latest project, I did what I always do :

git init
git add --all
git commit -m "Initial commit"

And I ended up with the following message :

fatal: bad object HEAD
fatal: 'git status --porcelain' failed in submodule modules/xxxx

WTF !!!
I had absolutely no idea what the problem was. I googled, stackoverflowed and searched for a solution all over the web. You will have to admit that the error was not very precise and informative. I thought that the submodule the message was talking about was a git submodule.

Finnaly, a flash of intelligence made me realize that it was a module of my program (in Prestashop, the directory containing modules is called modules). This module had been developped using git and the production directory still contained the .git directory so my local git refused to commit anything or even to display a status of the repository.

Hope this will help.

git fatal-error submodule

Je me lance

publié le 11/11/2014

Ca y est ! Après 6 années à travailler principalement en tant que salarié pour diverses entreprises de la région Rhône Alpes, j'ai décidé de me lancer comme développeur indépendant à plein temps.

Je réalisais déjà des développement sur mon temps libre pour des besoins très spécifiques mais maintenant ce sera mon quotidien. J'ai crée un petit site séparé : pour ma petite agence de développement.

Je me spécialise dans le développement de modules et de logiciels adaptés à des besoins spécifiques pour profiter de ma connaissance de nombreux métiers différents et ma capacité d'en découvrir facilement de nouveaux.Si vous avez des besoins de développements, n'hésitez pas : contact[chez] et si vous voulez vous faire une meilleure idée de mes compétences, visitez la page Créations.

new-exception développeur-independant web

Pourquoi un blog ?

Il me fallait bien entrer dans la modernité, après tout, un développeur sans blog, c'est comme un trailer sans pipette ça fait pas sérieux.

Je ne suis pas sûr que ce blog fera sérieux mais, si lecteur il y a, ce sera à eux d'en décider.

Powered by Jalmot