File: testing_script_in_script_server.html

package info (click to toggle)
cacti 0.8.6i-3
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 4,744 kB
  • ctags: 8,967
  • sloc: php: 39,760; sql: 2,306; xml: 678; sh: 487; perl: 133; makefile: 68
file content (96 lines) | stat: -rw-r--r-- 4,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
  <meta name="generator" content="HTML Tidy for Linux/x86 (vers 1st August 2004), see www.w3.org">

  <title>Testing Your Script in the Script Server</title>
  <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
  <link rel="HOME" title="The Cacti Manual" href="index.html">
  <link rel="UP" title="PHP Script Server" href="php_script_server.html">
  <link rel="PREVIOUS" title="Migration of Existing PHP Scripts to Script Server" href="migration_php_scripts_to_script_server.html">
  <link rel="NEXT" title="Using Cacti" href="using_cacti.html">
  <link rel="STYLESHEET" type="text/css" href="manual.css">
</head>

<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
  <div class="NAVHEADER">
    <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <th colspan="3" align="center">The Cacti Manual</th>
      </tr>

      <tr>
        <td width="10%" align="left" valign="bottom"><a href="migration_php_scripts_to_script_server.html" accesskey="P">Prev</a></td>

        <td width="80%" align="center" valign="bottom">Chapter 12. PHP Script Server</td>

        <td width="10%" align="right" valign="bottom"><a href="using_cacti.html" accesskey="N">Next</a></td>
      </tr>
    </table>
    <hr align="left" width="100%">
  </div>

  <div class="SECT1">
    <h1 class="SECT1"><a name="TESTING_SCRIPT_IN_SCRIPT_SERVER" id="TESTING_SCRIPT_IN_SCRIPT_SERVER">Testing Your Script in the Script Server</a></h1>

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

    <ol type="1">
      <li>
        <p>Start the script server - You can do this by typing the following command:</p>
        <pre class="SCREEN">
<samp class="PROMPT">shell&gt;</samp> <kbd class="USERINPUT">php &lt;path_cacti&gt;/script_server.php</kbd>
</pre>

        <p><b class="EMPHASIS">NOTE</b>: Due to a bug in Windows implementation of PHP, you must type the full path name to the <tt class="FILENAME">script_server.php</tt> file.</p>
      </li>

      <li>
        <p>Type in your command - Using the example from above, you would type in the following:</p>
        <pre class="SCREEN">
<samp class="PROMPT">script server&gt;</samp> <kbd class="USERINPUT">&lt;path_myfunction&gt; my_function argument1 argument2 ...</kbd>
</pre>

        <p>In the Windows environment, your example could be the following:</p>
        <pre class="SCREEN">
<samp class="PROMPT">script server&gt;</samp> <kbd class="USERINPUT">c:\wwwroot\cacti\scripts\ss_myfunction.php ss_myfunction localhost public 1 get duddle</kbd>
</pre>
      </li>

      <li>
        <p>If your function is operating properly, you should get a result.</p>
      </li>

      <li>
        <p>To quit the script server, simply type "quit" &lt;cr&gt; at the command line.</p>
      </li>
    </ol>

    <p><b class="EMPHASIS">NOTE</b>: If there are errors in your script, you must restart the script server before your retest your code.</p>
  </div>

  <div class="NAVFOOTER">
    <hr align="left" width="100%">

    <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="33%" align="left" valign="top"><a href="migration_php_scripts_to_script_server.html" accesskey="P">Prev</a></td>

        <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>

        <td width="33%" align="right" valign="top"><a href="using_cacti.html" accesskey="N">Next</a></td>
      </tr>

      <tr>
        <td width="33%" align="left" valign="top">Migration of Existing PHP Scripts to Script Server</td>

        <td width="34%" align="center" valign="top"><a href="php_script_server.html" accesskey="U">Up</a></td>

        <td width="33%" align="right" valign="top">Using Cacti</td>
      </tr>
    </table>
  </div>
</body>
</html>