[SVS] Generated Script: PHP Parse error

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SVS] Generated Script: PHP Parse error

    Hi,

    a generated Script via Excel gives me these errors when (re)starting the SVS:

    Source Code

    1. 2014-09-03 16:32:23 INFO: (6876) PHP Parse error: syntax error, unexpected '}' in C:\Program Files (x86)\Jedox\Jedox Suite\svs\custom_scripts\sep.global_status.php on line 65
    2. 2014-09-03 16:32:23 INFO: (6876) SupervisionServer: Exception caught! Type: PHPException | Message: "error opening main.php" (PHP.cpp:39)
    3. 2014-09-03 16:32:23 INFO: (6876) SupervisionServer: terminating.
    4. 2014-09-03 16:32:27 INFO: (6604) PHP Parse error: syntax error, unexpected '}' in C:\Program Files (x86)\Jedox\Jedox Suite\svs\custom_scripts\sep.global_status.php on line 65
    5. 2014-09-03 16:32:27 INFO: (6604) SupervisionServer: Exception caught! Type: PHPException | Message: "error opening main.php" (PHP.cpp:39)
    6. 2014-09-03 16:32:27 INFO: (6604) SupervisionServer: terminating.


    Related files:

    sep.inc.php:

    PHP Source Code

    1. <?php
    2. //include './sample_scripts/sep.inc.drill_through.php'; //dont need!
    3. include './custom_scripts/sep.global_status.php';
    4. ?>


    PHP Source Code

    1. <?php
    2. class SEPEventHandler extends SEPEventHandlerBase
    3. {
    4. public function OnUserLogin($UserName) {
    5. //sep_log("<< User logged in: $UserName >>");
    6. }
    7. public function OnUserLogout($UserName) {
    8. // sep_log("<< User logged out: $UserName >>");
    9. }
    10. public function OnUserAuthenticate($UserName, $password) {
    11. // sep_log("<< User authenticate >>");
    12. return true;
    13. }
    14. public function OnUserAuthorize($UserName, $password, array& $groups) {
    15. // sep_log("<< User authorize >>");
    16. return true;
    17. }
    18. public function OnWindowsUserAuthorize($Domain, $UserName, array $winGroups, array& $groups) {
    19. // sep_log("<< User Windows authorize, domain $domain, username $UserName >>");
    20. $groups = $winGroups;
    21. return true;
    22. }
    23. public function OnServerShutdown() {
    24. // sep_log("<< Server shutdown handler >>")
    25. }
    26. public function OnDatabaseSaved($database) {
    27. // sep_log("<< Databased saved : $database >>");
    28. }
    29. public function OnTermination() {
    30. // sep_log("<< Termination handler >>");
    31. }
    32. public function InitCubeWorker($database, $cube) {
    33. if($database == "test")
    34. {
    35. if($cube == "#_Attr")
    36. {
    37. $AreaA = array(array("ID"),array("Name"));
    38. $this->WatchCubeArea($AreaA,'CallbackFunctionCellChange');
    39. }
    40. }
    41. sep_log("<< InitCubeWorker >>");
    42. }
    43. public function InitDimensionWorker() {
    44. sep_log("<< InitDimensionWorker >>");
    45. // todo, insert your code here
    46. // begin example calls
    47. // $this->WatchElementCreate('Demo', 'Products', 'CallbackFunctionElementCreate');
    48. // $this->WatchElementDestroy('Demo', 'Products', 'CallbackFunctionElementDestroy');
    49. // $this->WatchElementRename('Demo', 'Products', 'CallbackFunctionElementRename');
    50. // end example calls
    51. }
    52. public function OnDrillThrough( $database, $cube, $mode, $arg ) {
    53. sep_log("<< OnDrillThrough >>");
    54. return "not implemented;\r\n"
    55. }
    56. }
    57. function CallbackFunctionCellChange($database, $cube, $areaid, $sid, array $coordinates, $value) {
    58. $user = get_user_for_sid($sid); // user who made the change
    59. $groups = get_groups_for_sid($sid); // groups of the user who made the change
    60. sep_log("<< VALUE: $value >>");
    61. // todo, insert your code here
    62. }
    63. function CallbackFunctionElementCreate($database, $dimension, $element, $sid) {
    64. $user = get_user_for_sid($sid); // user who made the change
    65. $groups = get_groups_for_sid($sid); // groups of the user who made the change
    66. // todo, insert your code here
    67. }
    68. function CallbackFunctionElementDestroy($database, $dimension, $element, $sid) {
    69. $user = get_user_for_sid($sid); // user who made the change
    70. $groups = get_groups_for_sid($sid); // groups of the user who made the change
    71. // todo, insert your code here
    72. }
    73. function CallbackFunctionElementRename($database, $dimension, $oldName, $newName, $sid) {
    74. $user = get_user_for_sid($sid); // user who made the change
    75. $groups = get_groups_for_sid($sid); // groups of the user who made the change
    76. // todo, insert your code here
    77. }
    78. ?>
    Display All


    Does anyone understand the problem?

    edit:
    There was a missing ";"
    Think it works now :D
    Some times u see the error only when u paste it :)