The Sphider 3.4.3-MB and SphiderLite 1.1.3 releases fix a number of issues which arose under PHP 7.3 and PHP 7.4. It was found that as of PHP 7.3, image indexing in Sphider MB releases had broken. This has been resolved. A couple of cleanup items were also done with each.
Sphider 2.4.3-PDO is a one time maintenance release to keep the PDO version running under PHP 7.3 and PHP 7.4. It is not intended to resume development on the PDO version at this time.
Version 3.3.0-MB of Sphider has been released. As far as indexing and searching functionality is concerned, this version is IDENTICAL to version 3.2.1.
What HAS changed is that the database has been altered to include the use of foreign key restraints. With the database thus being able to maintain key relationships on its own, some admin functions have been simplified as the code no longer needs to maintain the relationships. Database maintenance functions are accelerated and more reliable.
The BEST way to implement this newest version is either with a clean install, or to empty the database, upgrade, and re-index. It IS possible to upgrade in place, but the larger the database, the larger the risk. The upgrade process will attempt to back up the data only, delete the tables, recreate the tables with the foreign key restraints, then restore the data. This has been tested numerous times, but as previously mentioned, the more data there is, the higher the risk of data loss.
There is a file, “README_FIRST.” You are definitely encouraged to do just that for the simple reason that not all MySQL installations are created equal.
I have posted before about the problems Sphider may have on websites using a shared hosting plan. Sphider, in its normal form, uses both mysqli and mysqlnd extensions. Mysqli means “mysql improved”, and Mysqlnd stands for “mysql native driver”. In the past, mysqlnd was actually an optional extension, whereas beginning with PHP 7 it is integral to a MySQL installation.
With most PHP installations, nd (native driver) is the default. This is not the case with many installations used in shared hosting. The default may be mysqli, and not nd_mysqli. You can determine if nd is the default or not by running phpinfo() on your website and examining the results. Firstly, the results should contain a section with the title “mysqlnd”. Within that section, you will find a line “API Extensions”. If the value for “API Extensions is “no value”, nd is NOT your default. Below is a screenshot of a typical installation in which nd is NOT the default.
If nd is not the default, you may be able to change it. If your control panel gives you the option to view/change PHP extension settings, check that page. If you see “mysqli” is checked, and “nd_mysqli” isn’t, uncheck “mysqli” and check “nd_mysqli”. (“mysqlnd” should also be checked.) Save your changes. Now when you view the mysqlnd section of phpinfo(), the API Extensions should show mysqli. (You might need to do a browser refresh.) Note that having BOTH “mysqli” and “nd_mysqli” checked will give you a error when trying to save the settings.
In the event you do not have the ability to edit the PHP extension settings, contact your host administrator and ask if they will perform this change. Changing to the native driver as default should have zero impact on other parts of your website while making Sphider usable.
If you can’t change the extension settings, and your host admins can’t or won’t, your only Sphider option is to use the PDO edition. The PDO edition is currently at 2.4.2-PDO, which is stable, but there are no plans for further development. Meanwhile, the normal Sphider, which is currently at 3.2.0, continues to be developed and improved.
Sphider comes with the ability to backup and restore your database. How well this works depends on not only the size of the database, but on your MySQL settings. The restore could restore a single record at a time, but this would be time consuming. It would be reliable, but for a larger database you could probably spend the weekend at the shore while it ran. So, to speed things up, the restore process works on blocks of records. However, this increase in speed comes with a cost. If a block or records is too big, the restore will fail. There is a way to prevent this.
First off, check to see if you might have an issue. From a command prompt: mysqld –help –verbose –pid-file
In the results, look for “max_allowed_packet”. If the value is less than 33554432 (32M), you might have an issue. Values of 67108864 (64M) or greater and you should be good to go. The 64M is recommended, although larger won’t harm a thing! The value can be up to a maximum of 1G (1073741824).
If you need to increase the value of “max_allowed_packet”, there are two ways of doing so. The first is a permanent fix. Edit my.cnf (my.ini in Windows). In the “[mysqld]” or “[client]” section, put in “max_allowed_packet=64M”. If the line doesn’t exist, add it. Then restart the mysql service.
The second method is temporary, existing until the next time the service is restarted. Run this simple query: SET GLOBAL max_allowed_packet=67108864
Of course, in either instance, entering larger numbers will do no harm. More importantly, you can have confidence that the backup and restore procedures will work properly.
The Sphider database, like most databases, has relationships between various tables. Unlike most databases, however, these relationships have never been defined within the database! Sure, tables have had their keys, but there were no foreign key constraints. All relationships between tables and the consequences of record deletions or modifications have been handled strictly by the Sphider code. MySQL can handle this more efficiently than any Sphider code ever could.
At this point, adding foreign key constraints is really a straight forward task, since for the typical user, the tables all have data. It would be easy for new installations, but the presence of data complicates things. What has been done is to develop a method to back up the database, destroy and recreate all the tables (with foreign key constraints), and then repopulate the tables with the backed up data. The existing backup procedure was not an option because when a restore is run from that, the database would revert to one without the constraints. Then, Sphider code can be REDUCED in size by a couple hundred lines to eliminate code that handles relationship changes that MySQL can do more efficiently.
The process of building a process to back up the data, recreate the database with constraints, and restore the data has been completed. Now it has to be thoroughly tested. Early tests are positive, but we want to be sure. Once we have a high level of confidence in the process, Sphider 3.3.0-MB will be released. The intent is that the ONLY changes in 3.3.0 will be the database structure and associated code related to structure.
Look for Sphider 3.3.0-MB towards the end of July.
The next release of Sphider, 3.2.0-MB, will feature two new enhancements. The first will be the ability to show the query score using a 0-5 star system, using half-stars. The options to either show no score, or to show a score as a percentage (100% being the highest) will remain.
The second enhancement is the addition of the ability to limit the number of query returns by percentage. Currently, a query will find every possible result. Scores range from 100% to 0% relevancy. In 3.2.0-MB, a minimum relevancy can be set. Users can choose from 0, 20, 40, 60, and 80% relevancy as the minimum. The higher the number, the fewer results will be returned. In the example shown above, the query produced 74 results. If the floor had been set at 20%, the number of results would be reduced to 12. A floor of 40% further reduced the results returned to 7,
Along with a couple minor bug fixes, Sphider 3.2.0-MB will be coming in perhaps early June.