Level 2: config.php
Every standard PHP application has its own
config.php file.
This file is actualy simple-clever solution. If some user call it externaly, nohing will happened, no result is send back to user. All important configuration data can be here on one place. Most administrators expect main application or system configuration can be find here.
The VIS9® has this file too. It is used for very hard and main whole system behavior. It is used on every click (means every server query) to the VIS9 system. This file is a 2nd most important file in the system.
if administrator damage this file, whole VIS9®CORE can crush.
This solition is there by design as wanted solution. This file is used as it is before VIS9® boots its neural net. All system depends on it.
The basic/default structure of VIS9® config.php (version 9.3.2939)
1. | <?php |
2. | // PHP ERROR DISPLAY |
3. | // allows or disable PHP error messages |
4. | // error_reporting(E_ALL); |
5. | error_reporting(0); |
6. | |
7. | // FIXING ERRORS |
8. | // true - enables to fix external links and reloads request |
9. | $repairBrokenUrl=true; |
10. | |
11. | // DEMO MODE |
12. | // true - disables any editing, saving a opening risk files |
13. | $demo=false; |
14. | |
15. | // VISDOMS |
16. | // default user VISDOMS |
17. | $myVisdoms="berato,chess,creator,crm,farm,forrester,help,library,phonebook,photoalbum,sheets,surveillance,tasker,warehouse,windowsexplorer"; |
18. | |
19. | // ADMIN PASSWORD |
20. | // false means that admin password was not set yet. |
21. | // usualy, there may be encoded password |
22. | $adminPassword=false; |
23. | |
24. | // SHELL EXEC |
25. | // let use VIS9 external programs. |
26. | // options: false,'commandOnly','robotOnly','all' |
27. | $allowShellExec='robotOnly'; |
28. | |
29. | // VIS9(r) CONFIG PATH |
30. | // if you require to place data to another location, change this option |
31. | // the path must be eneded with a slash '/' |
32. | // the new config will be loaded over this one, but this one must be set still. |
33. | $vis9configNew="./data/"; |
34. | |
35. | // very dangerous stuff |
36. | $debugRawRequest=false; // creates request log at data root |
37. | |
38. | // external core |
39. | $webSubsystem="web"; // multiweb visdom |
40. | ?> |
When and how is this file created
Each VIS9® version has its own config builder included. If this file not exists, the VIS9®CORE recognize it as the CORE is not configured yet. So, each time you will call it, it starts VIS9®Desktop and let you chose, where you want to have config to be placed.
Well possible are two locations only:
In this order VIS9®CORE existency of files. So, if you have config on both places, the VIS9®CORE will pick
./data/config.php only.
So, if you feel
config.php is damaged, simple copy VIS9®CORE
index.php file to another location, start it, then chose location of new
config.php. The VIS9®CORE will generate a whole new
index.php. or, you can simple dete the
config.php where it is, and run your system.
Meaning of PHP variables at config.php
PHP ERROR DISPLAY
1. | // PHP ERROR DISPLAY |
2. | // allows or disable PHP error messages |
3. | // error_reporting(E_ALL); |
4. | error_reporting(0); |
As you can see the VIS9®CORE creates for you config helper too, for each value. There may be need to find what error VIS9®CORE finds. Default option means, no PHP errors will be displayed. When this value is changed to
E_ALL, then every VIS9®CORE option will contin any PHP error or warning it find.
FIXING ERRORS
1. | // FIXING ERRORS |
2. | // true - enables to fix external links and reloads request |
3. | $repairBrokenUrl=true; |
The VIS9®CORE can (and also must) repair damaged URLs whig are damaged mostly by 3rd party social networks engines. Those engines change sove values to character numbers like
. So, it may and does problems to VIS9 to recognize, what original URL was. Well, this fixer is allowed by default and VIS9®CORE can fix this.
DEMO MODE
1. | // DEMO MODE |
2. | // true - disables any editing, saving a opening risk files |
3. | $demo=false; |
You may have the good reason to use preconfigured VIS9® in demo mode. Perhaps for your employees education purposes. Well, simple changwe
$demo value to
true and you will have it.
The VIS9® does not allows to save or change important data and will report this demo mode to another applications.
VISDOMS
Applications for VIS9® are called VISDOMs. This setting allows you to preset default applications-set. These icons are prepared at MyVisdoms window when desktop starts. Each user can change it latter.
1. | $myVisdoms="berato,chess,creator,crm,farm,forrester,help,library,phonebook,photoalbum,sheets,surveillance,tasker,warehouse,windowsexplorer"; |
ADMIN PASSWORD
If
admin password is forgoten, it can be set temporary right here.
To have
admin password set by its profile, use this:
1. | // the admin passowrd is get from its profile |
2. | $adminPassword=false; |
To have
admin paasword se by
config.php, use this:
1. | // the admin passowrd is get from this value |
2. | $adminPassword="myTempPassword"; |
You can set add
admin rights to all users, by setting
$overRideAdmin to
true:
1. | $overRideAdmin=false; // can override admin rigts by anyone |
...but more safe, it to add
admin rights to on specific user:
1. | $overRideAdminByUserName=false; // can override admin rigts by specified user (more safe) |
2. | |
3. | // set it to something like this: |
4. | $overRideAdminByUserName="user9"; // can override admin rigts by specified user (more safe) |
SHELL EXEC
Some VIS9® applications can make real shell commands on your server. This can be pretty risky. But sometime it may be very needed. Well the VIS9®CORE let you do this by setting
$allowShellExec.
Options are:
- false : this fuction is disabled
- 'commandOnly' : it may be done by user commands only
- 'robotOnly' : it may be done by applications internaly only, no user commands allowed (deffault setting)
- 'all' : it may be done by user commands or applications
1. | $allowShellExec='robotOnly'; |
VIS9® CONFIG PATH
It is possibe to set default value for new application configs. These new programs sets its data to new location.
1. | $vis9configNew="./data/"; |
very dangerous stuff
This section allows you to set very dangerous stuff
If you feel, there may be some problem, you can set temporary the value
$debugRawRequest to
true. Now the VIS9®CORE will log all requests to its data root. It will create huge log in very short time. Never keep this value to
true for long time, please.
1. | $debugRawRequest=false; // creates request log at data root |
external core
Some internal VIS9®CORE functions can be overided elsewhere.
Web Subsystem
The VIS9®CORE has its own Multi Layer Web server. This technology allows you to have more then one independent webserver on one system. This is internal core solution. Well, you can also web server requests send to another application, if you have one by rewriting the
$webSubsystem property.
1. | $webSubsystem="web"; // multiweb visdom |
There are much more settings at
config.php what can be set. You will read about this in some next chapter. Of course, some new settings will be added in time with new fuctionalities.