PHP scripts

Unpacking the scripts

To install the php scripts, simply untar the PHP source archive into the directory in your web server's document root that you have created for your helpdesk system. This could simply be a directory called "helpdesk" or you could do more fancy things with virtual hosts but that is up to you. Make sure you specify the full path of the web-tree.tar archive if it is not in the current working directory.

#> tar xvf web-tree.tar

This should automatically create all the relevant folders and populate them with the correct PHP scripts.

Configuring PHP

The Helpdesk Issue Manager stipulates the values of certain PHP config variables. These are as follows:

include_path

Depending on where you have placed your scripts, you may have to update your PHP's configuration script in order to ensure that the include files can be found by the interpreter. For a system that is using a subdirectory of the document root, then you will have to make sure that that directory is listed in the PHP.ini file.

include_path = ".:/php/includes:/srv/www/htdocs/helpdesk"             # UNIX
include_path = ".;c:\php\includes;c:\intepub\wwwroot\helpdesk"        # Windows

If you are going to set up a virtual host to hold the system, then the default PHP include directories are sufficient.

arg_separator.output

In order to ensure XHTML1.0 compliance, this argument separator variable must be set to use ampersand entities instead of ampersand literals. This is because no element attribute is allowed to include the "&" character, and must instead be replaced with the "&" entity. This is used when PHP dynamically creates or modifies querystrings in order to keep track of sessions.

arg_separator.output = "&"

magic_quotes_gpc

In order to ensure that any input is correctly escaped, the following must be set to "On".

magic_quotes_gpc = On

magic_quotes_runtime

The runtime escaping of SQL commands is useful in some cases, but in this system (and most others) this conflicts with the previous config variable, and so this should be set to "Off".

magic_quotes_runtime = Off

short_open_tag

This config variable is quite frequently set to "On" because of the slight increase in simplicity of PHP code that can be written as a consequence. Sometimes however, this is set to "Off" in order to aid in developing of XML applications. Currently, it is required that this be set to "On". As this system is an XHTML application, this is something that will change in later versions so that this configuration varible can be ignored, but for now:

short_open_tag = On

register_globals (Optional)

This config variable is quite frequently set to "On" because of the simplicity of PHP code that can be written as a consequence. Unfortunately, security is difficult to ensure in such an environment as the POST variables are indistinguishable from SESSION variables. This is just good practice and not a requirement. This system will work just as well and just as securely whether this is set to "On" or "Off" because of the way it is written.

register_globals = Off

It must be understood that the PHP.ini configuration file comprises of many different variables for controlling many different aspects of the PHP interpreter. Whereas most of the unmentioned config variables would not directly affect the system, it is possible that there could be undesirable consequences from setting some of them. Fotrunately though, if you have left the defaults in place, you shouldn't have a problem.