Sphider – PDO vs MySQLi

There are TWO editions of Sphider… the classic edition using MySQLi and the PDO edition.

Why are there two versions? The classic edition uses MySQLi and prepared statements. While MySQLi, by itself, does support prepared statements, there are a couple functions used in Sphider that require MySQLnd (the “nd” stands for “native driver”). These functions are used because they are the most efficient way of doing things.

MySQLnd has been the default driver since PHP 5.4. If you install a modern version of PHP and want MySQLi, you are going to get MySQLnd. Yet SOME hosting companies DISABLE MySQLnd for those using shared hosting. (I suppose they want people to shell out a few more bucks to get VPS or Dedicated hosting.) In those situations, the classic edition just ain’t gonna work! So, there is the PDO edition.

There are those who will tell you that PDO is what you should be using anyway. They will tout how versatile PDO is, how it can do anything MySQLi can do, only better. It is true the PDO IS versatile. It can work with many different databases, not just MySQL. But there ARE some things PDO just can’t do, at least not efficiently. And there is overhead. And memory requirements.

With PDO:              PHP <==> PDO <==> Your data
With MySQLi:       PHP <==> Your data

The classic version of Sphider is the better, more capable edition! The PDO edition is capable enough PROVIDED you aren’t trying to build your personal version of an internet search engine. It IS possible to tax the PDO edition to the point it chokes. (It is probably possible to choke the classic edition as well, but it takes more effort.)

Remember, the intent of Sphider was/is to index a web site for the benefit of that site’s visitors. In can be used to index a number of related sites for the same purpose. An individual may stretch Sphider for personal use to index MANY sites… but it is STILL just a small indexing tool and not a Google replacement!

NOW… the final point. If you REALLY need Sphider to stretch its capabilities to the absolute limit, maybe you should be using the classic edition and not PDO. If that is the case, shell out a couple extra bucks to your host so you can get access to MySQLnd. Don’t try to pull a 20′ travel trailer with a Honda Civic.

Relativity Space and 3D printed launchers

It was recently announced by NASA that Launch Complex 16 at Cape Canaveral (unused since 1988) is to be turned over to Relativity Space. They intend to use the complex to launch their methane/LOX Terran 1 launcher. This 2 stage rocket stands 100 feet tall and can launch a 2750 lb payload into low-Earth orbit.

But the real kicker here is that the Terran 1, engines, tanks, and other structures, will be produced by a 3D printer! 3D printing has come a long way. The Terran 1 isn’t going to be plastic… at least not pure plastic. Their printer is a metal 3D. It doesn’t actually produce pure metal, but a metal mixed with a plasticizing agent.  This leads to higher strength and greater durability.

I don’t doubt the ingenuity of the folks at Relativity Space. But maybe I’m from Missouri. I want to see this thing fly a few times before I put much stock in its reliability. In my mind, a metal/plastic mix is… well… plastic!

Beware of the Podamibe Custom User Gravatar

I had been using a plugin, “Podamibe Custom User Gravatar”, for quite sometime. After a very recent “update” of this plugin, I was locked out of my own account!

My host support investigated and found Podamibe was the cause and disabled it for me. I was then able to log in, at which point I UNINSTALLED this misbehaving piece of software. I found another, less intrusive substitute.

Just thought you would like to know….

WorldSpaceFlight code changes

The WorldSpaceFlight pages dealing with the various flights (US, Russia, China) have undergone a behind-the-scenes update. A new class was introduced which eliminates a lot of code duplication and makes maintenance easier. Of course, this means a number of modules had to be changed to accommodate the new class structure. I might have missed something. If you notice anything “funky” about a particular page, please let me know so I can fix it. This can be something like weird characters, misplaced text, missing data, inappropriate data like a number where text is expected, or some kind of error message.

Just when you thought you could go back in the water…

Well, it seems the Sphider Forum wasn’t fixed after all. Superficially it looked okay. You could log on and see what topics there were. But you couldn’t actually view any of the posts to the topics, or create a new topic. So a rebuild is being undertaken, since the repair didn’t work. I really hope the uploaded data is safe. Apologies to anyone wanting to use the forum.

Holiday VPS woes

On Sunday morning, December 23, one of the worst nightmares of a web host came true. A VPS server suffered a hardware failure. The hardware was repaired quickly enough, but restoration of the VPS server was another matter.  The nightmares of the web host begat the nightmare of a webmaster. All four of the worldspaceflight sites went down. As restoration by the web host proceeded, worldspaceflight.com and sphider.worldspaceflight.com were functioning again Monday afternoon. Blog.worldspaceflight.com and forum.worldspaceflight.com were not so fortunate. There really wasn’t much that could be done until the VPS server restore was completed. For the uninitiated, restoring a VPS server is nowhere as simple of just copying a bunch of files back. IF ONLY! That restore was FINALLY completed Friday evening. Then it was discovered that the blog and forum were STILL not working. It turns out that for the blog (this site), there was a simple permissions problems which was quickly fixed. Three down, one to go. The forum is being stubborn. First, and entire cache directory (with needed driver files) was devoid of content. I THINK that is fixed, but now there may be ANOTHER permissions problem. We are working to resolve that. No guarantee there won’t be something else next, but hope springs eternal. The forum WILL be back.

Yeah, it has been fun, but PLEASE, let’s not EVER do this again!

Securing your Sphider

You may have read before that I have suggested securing the Sphider admin directory with password protection. After all, you don’t want to take a chance of someone else gaining access and changing all of your settings… or worse!

But Sphider has a number of other directories within it. What about those? Well, MOST of them can also be password protected. The rule is, if files in the directory only need to be accessed by PHP, it can be password protected. If any file in a directory needs to be accessed by a web browser, it shouldn’t be password protected. For example, the templates directory should not be password protected. It contains css files, which the browser needs to display search forms and results properly. Js_suggest should not be password protected, It contains javascript which the browser needs to access. The tmp directory (not the one in admin) should not be password protected as the browser needs to be able to read and write there. Other than that, go ahead and add password protection.

Oh! One more thing. Add SSL. That is something that at one time was expensive and primarily used by sites like businesses with checkout pages and such. Today, SSL in some cases can be free. DreamHost offers “Let’s Encrypt SSL” for free. Then there are self-signed certificates, also free (but not as trustworthy). The advantage of SSL is that when you do need to enter user name/password to one of your password protected directories, it can’t be intercepted.

Typo in Sphider 2.2 install script

A typo has been discovered in ‘install.php’ for Sphider 2.2.0 (classic). This will affect those who have 1) already downloaded ‘sphider-2.2.0.zip’, and 2) are trying to do a clean install. Any downloads after right now already have the file corrected.

This does not warrant a new release, but simply instructions on how to fix the problem if you have it.

Line 23 currently has:


Change this to:

$settings_dir = “../settings”;

This does NOT affect the PDO edition.

Sphider 2.2.0 released

Sphider 2.2.0 was released today in both the Classic and PDO editions.

There are currently no plans to release this update in PostgreSQL or SQLite editions. Those remain at 2.1.0. There seems to be little demand for these.

Sphider 2.2.0 has the search interface redesigned to be more mobile friendly. The code was rewritten to be more responsive to CSS instruction, made to detect the use of mobile browsers, and present a mobile friendly version of the standard template.

A minor security problem was also addressed, as well as the ability of the administrator to easily switch between the tabbed search (traditional, RSS, and image) and just the basic traditional text search.


There are plans for the next release (February 2019 ???) to expand this ability so that the administrator can pick and choose which search interfaces to present. If they want both traditional and image, but not RSS, they will be able to do so.

Also, the templates will be reworked so mobile browsers can experience friendly versions of ALL the templates.