First, I apologise to my Readers for the interregnum (time gap which has taken place, since the last post No. 1015 here). Reason: I was designing and experimenting with a php script, to use as a front end for Gladius database, which is written in pure PHP. It is based on flat-database files. They are portable in the sense that each database is stored in the form of a folder, and tables are stored in the form of files in the respective database folders. This, we can see, is in contrast to traditional database packages like sqlite, mysql, postgresql, the databases and tables relating to which, we cannot see as separate files. Besides, all the three principal traditional databases sqlite, mysql, postgresql, need installation. They, themselves, do not provide gui-s (graphic user interfaces) for carrying out data entry operations. We have to use third party tools for data entry, or alternatively use command-line. Of course, mysql and postgresql facilitate multi-user environment, admin, user creation, user rights, passwords, 'connect' using the user names and passwords. From the security point of view both mysql and postgresql score high. Though, not using usernames, passwords, etc. may pose security risks, certain type of databases and tables do not require much of security. The information they contain may be of innocuous public opensource type, where secrecy and security are not important. Gladius DB will be of good utility in such situations, because the hastles of getting connected through usernames and passwords can be avoided.
First, I present below a PHP script for creating and using Gladius Databases and tables. After that, I shall list out some precautions and pre-requsites for effective of use of Gladius, and this PHP script.
Most PHP Scripts are portable and platform independent.
That means, they can be used on all the OSes including Windows, Linux all flavours, Mac., etc. They can also be stored on USB pen drives, and transferred from one machine to another machine. But, there is one word of caution: .PHP files can be tested and worked with, off-line only when there are properly configured Apache2 Server (or some other equivalent server), and PHP (in case of Gladius php5 version or later). At present, I use Ubuntu 15.04 and 16.04 versions. In the earlier versions such as Ubuntu 10.04, 10.10, 11.04, 12.04 etc. there was greater freedom in the sense that any folder can be designated as 'DocumntRoot' or public_html or 127.0.0.1 or localhost. In Ubuntu 15.04 and 16.04 more security restrictions have come. Consequently, we cab designate only a particular folder such as 'Public' as DocumentRoot and local host for the Apache2 Server and the PHP files. Significant number of threads are available on the internet for troubleshooting problems in designating localhost (127.0.0.1), in the place of folders like var/www which require use of Admin/Root Passwords. Once Apache and PHP are appropriately configured, working with PHP becomes very easy, flexible and rewarding.
Creating databases and tables by PHP and Gladius DB
Creating databases and tables in Gladius folder requires user permissions and accesses for 'Create and Delete iles', 'Read and Write' for files. In respect of files created by PHP and Gladius, the owner of the files will be 'www-data', and not the user of the machine.Link to Gladius DB
Click here to go https://sourceforge.net/projects/gladius/- for a download.
The Gladius is available as a zip file. After downloading, we have to unzip it in a folder which has been designated as folder for DocumentRoot / localhost / 127.0.0.1. Then only, php will work. We have to make sure that all access create, delete, read, write rights are given to the folders and files. It may also be necessary to read about the Disclaimers of the Gladius Creators, and licensing restrictions. Though it is free and open-source, we cannot use for commercial purposes. Those Readers who are interested in reading the source files can also read them, by opening the php files in a text editor.