Chapter 12. PHP Script Server
3. Save the XML file.
12.3.3. Data Query & Data Template Changes
Your Data Queries and Data Templates must be also changed. Although somewhat self explanatory by now, you must
make the following changes:
1. Change it's Input Method to "Get Script Server Data" or "Get Script Server Data (Index)" depending on it's type.
Change the XML file path to point to the new XML file in the <
path_cacti
>
/resources/script_server/*.xml
path.
For all data templates that use the data query you must change their "Data Input Method" accordingly.
Your final step is to go to the System Utilities and Clear Poller Cache to apply the new settings. If you script is operating
correctly, you should now be migrated to the script server.
12.4. 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" 
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"  at the command line.
NOTE: If there are errors in your script, you must restart the script server before your retest your code.
29
<





New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

 

Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting

 
 

Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Php Mysql Web Hosting