The Cacti Manual
Prev | Chapter 14. PHP Script Server | Next

# Testing Your Script in the Script Server

To test your script in the script server, simply follow the instructions below. When you have finished you testing, simply type "quit" <cr< at the Script Server command line to exit the script server.

1. Start the script server - You can do this by typing the following command:

       shell> php <path_cacti>/script_server.php

   NOTE: Due to a bug in Windows implementation of PHP, you must type the full path name to the `script_server.php` file.

2. Type in your command - Using the example from above, you would type in the following:

       script server> <path_myfunction> my_function argument1 argument2 ...

   In the Windows environment, your example could be the following:

       script server> c:\wwwroot\cacti\scripts\ss_myfunction.php ss_myfunction localhost public 1 get duddle

3. If your function is operating properly, you should get a result.

4. To quit the script server, simply type "quit" <cr> at the command line.

NOTE: If there are errors in your script, you must restart the script server before your retest your code.

Prev | Home | Next
Migration of Existing PHP Scripts to Script Server | Up | Spine