HTTP/PHP/MySQL
A Condensation HTTP store for any PHP-enabled web server. Accounts and objects are stored on a MySQL/MariaDB database. A simple admin interface allows to view and remove accounts, and run garbage collection.
Download
2016-05-13 – condensation-store-php-mysql.zip
Notes
Copy the scripts onto your web server, and configure the database connection in configuration.inc.php.
The package contains two main scripts:
- store.php with the actual store implementation
- admin.php with an admin interface
Make sure that the admin interface is not accessible to the public.
Configure your webserver such that all URLs starting with
http://your-server.com/path/store.php/...
are passed to store.php. Similarly, all
http://your-server.com/path/admin.php/...
URLs should be handled by admin.php. Many web servers are configured like that already.
The scripts require following server variables:
REQUEST_METHOD | HTTP request method with uppercase letters, e.g. GET |
REQUEST_URI | the full path, e.g. /path/to/admin.php/accounts/ |
PATH_INFO | (optional) the sub path, e.g. /accounts/ |
If the PATH_INFO variable is not available, the sub path is derived from the request URI. If you are passing different variables to your PHP script, adapt the code in utilities.inc.php accordingly.
Signatures
The store currently does not verify signatures.
Store URL
The store URL to be passed to Condensation is:
http://your-server.com/path/store.php
Database layout
The store uses two tables:
- The boxEntries table stores the hashes of each account and box. This table remains small.
- The objects table stores objects as blobs. This table may contain large amounts of data. The creation time of each object is stored and used during garbage collection.