Program O Installation Help
[helpContent]
What all this stuff means...
This help file is intended to describe the various settings used to install Program O to your website. Each section is explained, and when necessary examples are given. Some settings are automatically generated, but should be checked carefully for accuracy. please visit the website Program O.
General Configuration
Botmaster Info
Your Name
Fairly well self-explanatory. Just enter what you want your bot's visiters to know you by.
Email Address
Used internally to set up contact details, and to (optionally) send debugging data. See below for debugging options.
Bot Configuration
Much of the information in this section is pretty much self explanatory, but in the interest of being thorough, the following items are included. :)
Bot Name
It's been said that names are the cornerstone of existence. Names also have power. Choose your bot's name wisely.
Bot Description
This is where you provide whatever "back-story" or attributes you like for your chatbot. Feel free to leave this blank, but remember that a more well thought out bot will USUALLY make for a higher quality bot.
Bot Active
In order for a chatbot to be visible and/or usable, it has to be marked in the database as active, but there are times when you need to disable or hide your chatbot. Changing this setting in the admin pages is the best way to handle that. If you want folks to be able to use your bot, then this needs to be set to TRUE (checked).
Default Pickup Line Pattern
This is the "default" category that Program O searches for if nothing else matches. Traditionally this is set to RANDOM PICKUP LINE or *, but it can be set to pretty much anything (within reason). Whatever you set this to, just make sure that there is an AIML category with a <pattern> that matches it.
Error Response String
This is what your bot will say to the user if it encounters an internal error. What you set it to is completely up to you, but it must have a value of some sort.
Chat Line Count
This setting tells Program O how many lines of chat to display at a time. Set it to zero (0) for unlimited, but beware that this can affect your bot's performance if it gets a lot of users at one time.
History Count
This setting determines how far back your bot "remembers" the conversation. There is no "unlimited" setting for this one, since that would eat up resources far more than necessary, and would severely affect bot performance. It's suggested that this be set to no more than 30, to prevent undue lag. If you're using the JSON response setting, you may want to set this to only 1, and use client-side scripting to add the responses to a div of (possibly) already existing responses, so as to create an "unlimited" chat log for the visitors. Just a suggestion, though. :)
Response Format
Default: HTML
Program O gives you three options for parsing your bot's responses:

- HTML This option causes Program O to output responses in HTML format. It's the best way for a beginning Botmaster to get started with their bot, because it's the easiest to set up.
- JSON This option causes the script to parse the bot's output as a JSON (JavaScript Object Notation) object, which your bot script can use to embed the responses within a currently open HTML page. This method is best used by client-side scripts, such as jQuery.
- XML Program O can also parse the bot's output as an XML document, which can be used by either client-side scripts, server-side scripts, or even stand-alone computer applications. XML is by far, the most versatile of the three available options, but it's also the most challenging to use and configure.

There are sample pages in the GUI directory that you can examine and use, but bear in mind that these are simply example pages, and will likely require some modification prior to use.
Database Configuration
Database Connection Info
Please note that you must have already created the database for your bot, though that database can be empty (the script will create the necessary tables automatically). This is so because many web hosting companies do not allow their customers to create new databases except through their web hosting control panels. Please have the database connection information ready at this point.
Database Host Name
Default: localhost
This setting is part of the local database login credentials that allow Program O to connect to your bot's local database. Under the vast majority of circumstances, this is simply 'localhost', but there is the occasional rare exception.
Database Port
Default: 3306
Required only in the very rare case that the database server has been configured to use a different port.
Database Name
When you performed the task of creating your local database, you should have already named the DB, along with configuring username and password. The DB name from that information goes here.
Database Username
Just as with the name of the database, above, this is part of the connection information that you should have gathered when you set up your bot's DB.
Database Password
This is the password for your script to access your bot's database. There's no confirmation for this field, like there was with the admin password, earlier, so be careful to ensure it's entered correctly.
Database Timezone
This is the timezone info for server. This setting should be automatically set by the installation script, but you should verify it's accuracy.
Chatbot Administration Info
Admin Area Username
The administration pages for Program O are restricted to the chatbot's administrator, and so must be provided with proper credentials. This is the username for the Admin account.
Admin Area Password
Just like the admin username, this setting is required. This password is encrypted in the database, to help improve security.
Debugging Options
Debug Level
This setting determines the amount of data generated by the debugging functions. Here you have a choice of four options:

- Nothing No debug data is created. Improves bot performance by a small amount.
- General Only basic information is generated.
- General/SQL In addition to the data generated in General, above, all SQL statements are also recorded.
- Everything The results from a vast number of operations, calculations or function calls (sometimes several times within certain functions) is generated. WARNING! HUGE amounts of data is generated with this setting, to the point where script performance will be affected, especially if the debug output method is set to "Show in Source". And for God's sake, DON'T use this if you're going to have debugging data sent to your email!

For the most part, this should be set to "Nothing", unless you're trying to trace a problem with your AIML files, and even then, it's best to only use "General". The only time the other two settings should be used is to troubleshoot the script itself.
Debug Mode
Default: File
"Debug Mode" is a setting to determine which output method is used for providing debugging data. This setting allows you to choose how to obtain debugging information in the following ways:

- Show in Source Places debugging data in the source code of the page, within HTML comment tags. Note - only works when Response Format is set to HTML(See below)
- File Creates a debug file that's based on the user's internal id and the current time. Stored in the /chatbot/debug/ folder.
- Display Prints debugging data directly to the screen. Note - only works when Response Format is set to HTML(See below)
- email Sends debugging data via email - WARNING! can create a LOT of email traffic! Use sparingly, and with care.

Save State
Default: Session
This setting determines how Program O will manage user data. Again, you have some options:

- Session This is the default behavior, and it causes Program O to save all current user data into a single session variable, in array format.
- Database Instead of saving the user data in the PHP session array, this saves the data to the bot's database instead.

There's no real advantage, one way or the other here. It's simply a matter of preference.
Troubleshooting
File Permissions

If you've been directed here, then your web server doesn't allow the install script to modify file permissions automatically. If this is the case, then modification of the permissions for the config file will have to be done manually, BEFORE the install script can continue. Otherwise, you'll end up with a corrupted installation, and will have to start over. This problem seems to be limited to Linux systems, since Windows handles file permissions differently.

To manually change file permissions on a remote server, you usually have a couple of options. If your hosting provider provides a user control panel, you can use the File Management section to change permissions. You can also use the FTP client software that you used to upload the file to change permissions. The methods for changing file permissions with an FTP client application vary from program to program, so if you're unsure about how to go about the task, try reading your FTP program's Help file. Search for either "file permissions", or "CHMOD".

The correct setting for the file permissions for the config file is 755. If you're unsure what this means, then have a look at http://www.perlfect.com/articles/chmod.shtml for a good tutorial about the CHMOD command, and what the various settings mean. For our purposes, that setting means that the config file can only be written to by the file's "owner", while everyone can read and execute the file. If the file can't be properly written to, then the script can't save the settings that you've set or changed, and your bot won't work correctly, so it's important that the config file has it's permissions set correctly.