| sqlayrc(5) | SqLay Suite | sqlayrc(5) |
sqlayrc - configuration file for sqlay.
.sqlayrc User configuration file for C/C++ SqLay tools.
sqlay_config.php Site configuration file for PHP SqLay framework.
The .sqlayrc file allows you to customize the behaviour of sqlay C/C++ (ascii, ncurses, Qt) tools at startup.
Basically, it allows you to store, as they are documented in the OPTIONS section of sqlsc and sqlds
man pages, but without the leading dash, the command line options of the executables.
The options are supposed to be written in the beginning of the line (no leading space or tab or whatsoever).
Options accepting an argument should be followed by one and only one tab or space, then by their argument, all on the same line.
Empty lines or lines beginning with a # are ignored.
The sqlay_config.php file allows you to set site wide global variables for a SqLay site.
It is a PHP file, so it accepts all PHP syntax and constructs.
Used global variables are documented beneath.
You may wish to add your custom variables inside: they will be ignored by the SqLay framework itself, but not by your pages using it.
See also sqlds(1) and sqlsc(1).
T.B.W.
sqlay_config.php is mainly used to define site wide global variables as standardized page header and footer,
a global menu array and locale and database defaults. Nevertheless, those values may always be overwritten in pages as
sqlay_config.php is parsed first as soon as any sqlay/*.php page is loaded by a require or include.
Global arrays:
The $sqlay[ ] array is the main source of global information and is known by each SqLay function.
It is divided in sub-arrays for better readability.
Miscellaneous $sqlay[ ] array indices:
- debug Mixed (integer or array), debug level if integer, default to 0, mostly used to debug sqlay framework functions.
Please note that you should not leave debugging on if not strictly necessary as, not only it may generate hundreds of lines for each
single page hit and thus create huge log files and really slow down pages generation, but also some functionalities (redirects) may not
work anymore.
- $sqlay['debug'] indices:
- level Integer, level of debugging, default 0.
- channel String, in syslog, file or http, no default.
- file String, file name, sets channel to file, default /tmp/sqlay_php.log if channel set to file.
Application $sqlay['app'][ ] array indices:
This sub-array stores information over the general application behaviour.
- $sqlay['app']['requires'][ ] indices:
- sqlay String, version name of sqlay required. No default.
- id String, single word identifying application. Optional, no default.
- version String, single word identifying application version. Optional, no default.
- compat Any, if set, enables some deprecated variables. Optional, no default.
- admin String, name or e-mail address of person maintaining this application. Optional, no default.
- debug Integer, debug level for application functions like database queries. Optional, default 0.
- foreign Boolean, wheter pervasive functions like modifying error reporting and altering php.ini values should be disabled. Optional, default false.
- src String, subdirectory of include path where auto-loadable scripts reside. Optional, default 'sqlay.src'.
- tmp String, web server writable temp dir used i.e. for generation of OpenOffice.org files.
Should NOT contain subdirectories named 'sxc' or 'sxw' as those would be dynamically created and deleted by the generation.
Mandatory for OpenOffice.org files generation, no default.
- tpl String, filesystem directory where templates i.e. used for generation of OpenOffice.org files reside.
Unless overwritten by page template name, should contain at least an empty spreadsheet file called default.sxc
(currently neither shipped nor generated by SqLay) containing at least one sheet called 'sqlay_table'.
Mandatory for OpenOffice.org files generation, no default.
- txt String, filesystem directory where text files containing directory indexes textual content reside.
Authentication $sqlay['auth'][ ] array indices:
This sub-array stores information over the authentication layer.
- style String, allowed value is 'https' in which case all tables are set read-only if not in HTTPS mode,
and a 'login' hyperlink based on $_SERVER['SERVER_NAME'] is placed in the menu footer if
not in HTTPS mode. Optional, no default.
- $sqlay['auth']['driver'][ ] indices:
- name String, authentication method with allowed values 'http', no default.
- $sqlay['auth']['user'][ ] indices:
- id String, login, no default.
- password String, password, no default.
- $sqlay['auth']['group'][ ] indices:
- query String, SQL query to be run against current connection, allowing to check group membership of a user, no default.
Accepts the following substitutions: '$user' and '$group' which will be substituted at runtime by the user
id and group name.
- file String, file name (i.e. .htgoups format) to be parsed in order to check group membership of a user, no default.
Membership is acknowleded if user id is found in a line beginning with group name.
- default String, group name to be considered as the default group to which all users should be checked to belong to, no default.
Database (input) $sqlay['in'][ ] array.
This sub-array stores information over the database connection.
- $sqlay['in']['driver'][ ] indices:
- name String, driver name, default to SQLAYINDRIVER specified in config.php.
- options String, currently understood options are only native which would disallow
autoloading of sqlay-php_mod C driver if installed.
- $sqlay['in']['conn'][ ] indices:
- host String, host name of database server, default to localhost (?).
- db String, database name, no default.
- port String, database port (untested), default dependant of backend.
- user String, database user, no default.
- password String, database password, no default.
- number Number, supposed to be read-only, set at connection time, keeps information on the current connection number.
- handle Void, supposed to be read-only, set at connection time, keeps information on the current backend type dependant connection handle.
- anonymous String, default database user which, if set, will be used for unauthenticated database access, typically read-only,
and would dynamically set user to $sqlay['auth']['user']'id'].
Optional, no default.
Output $sqlay['out'][ ] array indices:
This sub-array stores information over the output options.
- $sqlay['out']['driver'][ ] indices:
- name String, driver name, currently only 'html', default to SQLAYOUTDRIVER specified in config.php.
- locale String, locale name, default to en_US.
- charset String, charset name, default to iso-8859-1.
- images String, images prefix, no default (?), might be /images/sqlay/btn_ in future.
- $sqlay['out']['mod'][ ] indices:
- id String, module id, default to directory name.
- name String, module name, to be displayed between the site and page labels in menu title, defaults to $sqlay_menu ['name'].
- label String, module label, to be displayed between the site and page labels in page title, defaults to $sqlay_menu ['label'].
- menu String, contains the text of the local menu to be displayed in a menu frame
between global menu items.
- intro String, contains the text to be displayed in the home frame of a directory index page.
- $sqlay['out']['page'][ ] indices:
- id String, default to file name.
- name String, to be displayed on the right side of the menu title, defaults to $sqlay ['out']['page']['id'].
- label String, to be displayed on the right side of the page title, defaults to $sqlay ['out']['page']['name'].
- tabs (WIP) String, backend dependant string to be displayed under the main table in $sqlay_dptype pages for using tabs.
- header Array, understandig 'top' and 'bottom' subarray indices, no defaults, allowing to customize page header using backend dependant string.
- footer Array, understandig 'top' and 'bottom' subarray indices, no defaults, allowing to customize page footer using backend dependant string.
- body String, backend dependant string to be echoed as page body, no default.
- template['name'] String, name of template file, optionally including extension which defaults to sxc, to be found in
$sqlay['app']['tpl'] which will be used for OpenOffice.org file generation. Defaults to 'default'.
- background['image'] String, filename of image to be used as background, html backend only, no default.
- $sqlay['out']['menu'][ ] indices:
- opts Array, GET parameters to be passed on menu frame, no default.
- header Array, understandig 'top' and 'bottom' subarray indices, no defaults, allowing to customize menu header using backend dependant string.
- trailer String, contains the text to be appended at the end of the global menu.
- footer Array, understandig 'top' and 'bottom' subarray indices, no defaults, allowing to customize menu footer using backend dependant string.
- src String, script name to be executed in order to generate the menu frame instead of automatic generation from global menu array, no default.
- background['image'] String, filename of image to be used as background, html backend only, no default.
The $sqlay_menu[ ] array is kept separated from the main $sqlay array for performance reasons.
It stores the content of the global menu and per-item options. It is immediately indexed on directory names.
$sqlay_menu[ <directory name> ][ ] array indices:
- name String, short name to be used as directory name, i.e. in menu entries, default to directory name.
- label String, long name to be used as directory name, i.e. in page headers or titles, default to name.
- auto Boolean, whether to display it automatically, default TRUE.
- acl String, name of the only group able to see this menu item, no default.
- root Boolean, whether this item should only be visible in the root menu, default FALSE.
~./sqlayrc User global configuration file for SqLay C/C++ tools.
<include path>/sqlay_config.php PHP site wide configuration file (path needs to be in PHP path).
Besides from the configuration files, please note that some environment variables may be taken into account for SqLay tools (see their man pages).
Pls understand that this is an alpha release and none of the executables is securized against buffer overflows, and so on.
As for the PHP framework, it will probably not damage your system but may damage your database or the integrity of your data.
While currently rather different from each other, documentation on both configuration files are kept in the same page
as they are supposed to merge more and more in future releases.
See the NOTE above for important security warnings.
E. Lurquin <sqlay@hitud.net>
sqlay(1), sqlds(1), sqlsc(1), sqlay_php(3), the source code of SqLay PHP framework.
| sqlayrc 0.8 | Dec 2008 | sqlayrc(5) |