The Intelephant in the room

For some reason, I do all my development work in Apache/MySQL for export to an IIS/MSSQL production environment. Why? Personal preference, and, at least officially, ensuring my code works across environments. Okay, personal preference.

Anyway, thanks to the soon-to-be demise of Atom.io, I was plugging away in VS Code, my distant second favorite editor (it is still missing some features I use regularly, because why would anyone need to do anything like that), to get used to it before it is too late, and, well… it was throwing errors.

Specifically, the PHP Intelephense plugin was insisting that my PHP/MSSQL commands did not exist.

So what do you do when that happens? Right! You search for answers on the web (and 90% of the time end up on Stack Overflow).

This search led me three categories of answers:

Now, even though there were no “you can’t get there from here” answers, I figured what all these things were telling me was that there was probably a checkbox somewhere in the PHP Intelephense settings to fix exactly this problem. Lo and behold…

In the PHP Intelephense settings, scroll all the way down until you get to the Stubs section. It has a list of stub files for language extensions. At the bottom of the list, select “Add Item” and picks the ones you need. In my case, sqlsrv, though I also added mssql to be safe.

Simple enough, but I have found that, if it is not a really obvious and common problem, finding solutions to coding and software problems with web searches is almost counterproductive. Trolls throw out insults for people who don’t code exactly the way they do, or for not asking perfectly formed questions. Helpful people solve the wrong problems, or give overly-long perfect configuration solutions when all you needed was that one missing checkbox. People assume, if you are trying to fix a problem, you are an experienced a programmer as they in the exact same sub-specialities. Or that this is your first time touching a computer, ever.

So why is it so hard to find simple answers to legitimately simple problems on the web?