Commit 4198cb96a74175ebd99edd6097636abfba559c8d
1 parent
664fdd14
WSA-6
"validate configuration of examples is correct so developers can easily evaluate webservices" Implemented. Checks if caching is disabled and that required folders are installed. Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7142 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
35 additions
and
0 deletions
ktwebservice/checkup.php
0 → 100644
| 1 | +<?php | |
| 2 | +require_once('../config/dmsDefaults.php'); | |
| 3 | + | |
| 4 | +$config = KTConfig::getSingleton(); | |
| 5 | + | |
| 6 | +$cacheEnabled = $config->get('cache/cacheEnabled')?'The cache appears to be enabled. This is known to cause problems with the webservice. Please disable it.':'OK'; | |
| 7 | + | |
| 8 | +$uploadsDir = $config->get('webservice/uploadDirectory'); | |
| 9 | + | |
| 10 | +if (empty($uploadsDir)) $uploadsDir = 'The webservice/uploadDirectory setting is blank in the config.ini. Please configure it to an appropriate setting.'; | |
| 11 | + | |
| 12 | +$uploadsExists = !is_dir($uploadsDir)?'The upload directory does not exist.':'OK'; | |
| 13 | +$uploadsWritable = !is_writable($uploadsDir)?'The upload directory is not writable.':'OK'; | |
| 14 | + | |
| 15 | +?> | |
| 16 | +<B>Basic Web Service Diagnosis</b> | |
| 17 | + | |
| 18 | +<table> | |
| 19 | +<tr> | |
| 20 | + <td>KnowledgeTree Cache</td> | |
| 21 | + <td><?php print $cacheEnabled?></td> | |
| 22 | +</tr> | |
| 23 | +<tr> | |
| 24 | + <td>Upload Directory</td> | |
| 25 | + <td><?php print $uploadsDir?></td> | |
| 26 | +</tr> | |
| 27 | +<tr> | |
| 28 | + <td>Upload Directory Exists</td> | |
| 29 | + <td><?php print $uploadsExists?></td> | |
| 30 | +</tr> | |
| 31 | +<tr> | |
| 32 | + <td>Upload Directory Writable</td> | |
| 33 | + <td><?php print $uploadsWritable?></td> | |
| 34 | +</tr> | |
| 35 | +</table> | |
| 0 | 36 | \ No newline at end of file | ... | ... |